[XML-SIG] Equivalence test for DOM Nodes?

Roman Kennke roman at interview-machine.com
Wed Nov 26 08:12:05 EST 2003


> Roman Kennke wrote:
>> Hi list,
>>
>> Is there a utility function or something to recursivly compare two DOM
>> Nodes for equivalence? For instance:
>>
>> <x:a xmlns:a='http://abc.org'>
>>   <y:b xmlns:b='http://xyz.org'>
>>     foo
>>   </y:b>
>> </x:a>
>
> I think you meant to bind 'x' and 'y' prefixes there, not 'a' and 'b'.
> If you didn't, the documents definitely aren't equivalent :)

oops. ;-)

> Try the Ft.Xml.Lib.TreeCompare module in 4Suite. We use it in our test
> suites.
> I have just added doc strings to it. It is namespace aware and works with
> minidom as well as Domlette.

I'm gonna check this out.

Cheers, Roman

--
SOAP for Python
http://interview-machine.com/soap/




More information about the XML-SIG mailing list