[libxml-devel] Changing node equality

Charlie Savage cfis at savagexi.com
Mon Jul 7 03:18:38 EDT 2008


This bug report is interesting:

http://rubyforge.org/tracker/index.php?func=detail&aid=19772&group_id=494&atid=1971

Basically, the code compares two nodes using the == operator, assuming 
that == means equal? (same object) and not eql? (equivalent object).

Right now libxml-ruby does the opposite by defining eql? (and thus ==) 
to be the comparison of two different node's raw xml (as a string). 
Needless to say, that can be an extremely slow operation for large 
documents.

In addition, I can't see how libxml-ruby's interpretation is even useful 
- why would you want to compare if two node's raw xml is the same?  For 
point of comparison, it looks like rexml does not override eql?

So, I'd like to change the libxml bindings by removing the overridden == 
operator, thus making == mean equal?

Objections?

Charlie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://rubyforge.org/pipermail/libxml-devel/attachments/20080707/7611d37f/attachment.bin>


More information about the libxml-devel mailing list