FAQ
I need to compare one xml document to another to see if the content matches.
Unfortunately, the formatting (spacing) and order of elements may change
between files from run to run. I have looked into xml dom minidom but can't
seem to find how to accomplish this. Does anyone know how I can do a compare
between two XML documents using the STL?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090817/12f5e3ab/attachment.htm>

Search Discussions

  • Simon Forman at Aug 18, 2009 at 7:42 pm

    On Mon, Aug 17, 2009 at 3:51 PM, David Brochuwrote:
    I need to compare one xml document to another to see if the content matches.
    Unfortunately, the formatting (spacing) and order of elements may change
    between files from run to run. I have looked into xml dom minidom but can't
    seem to find how to accomplish this. Does anyone know how I can do a compare
    between two XML documents using the STL?
    It seems to me that you're going to have to "normalize" the documents
    to be able to compare them. (I.e. strip or ignore spacing
    differences, sort the elements to be in the same order, etc..)

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedAug 17, '09 at 7:51p
activeAug 18, '09 at 7:42p
posts2
users2
websitepython.org

2 users in discussion

Simon Forman: 1 post David Brochu: 1 post

People

Translate

site design / logo © 2022 Grokbase