[libxml-devel] [ libxml-Bugs-21918 ] find() returned Nodes in 0.5.x, Attrs in 0.8.3 with this expression

noreply at rubyforge.org noreply at rubyforge.org
Sat Nov 15 19:45:38 EST 2008


Bugs item #21918, was opened at 2008-09-11 11:37
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1971&aid=21918&group_id=494

Category: General
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Jamie Orchard-Hays (jamieorc)
Assigned to: Nobody (None)
Summary: find() returned Nodes in 0.5.x, Attrs in 0.8.3 with this expression

Initial Comment:
With this expression:

doc.find("/TEI.2/text/body//div1[@type!='header']/@id")

0.5.4 returned Nodes, while 0.8.3 returns Attrs. Is this an intentional change? I was calling content() on each item, which now blows up because they are Attrs, not Nodes.



----------------------------------------------------------------------

>Comment By: Charlie Savage (cfis)
Date: 2008-11-15 17:45

Message:
Hi Jamie,

Yes, a new attribute object was introduced to model libxml attributes (which are slightly different than nodes).

Sorry that this caused you a problem.

Charlie

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1971&aid=21918&group_id=494


More information about the libxml-devel mailing list