tags:

views:

151

answers:

1

If some nong has accidentally entered the same attribute more than once in the same tag how do I select the last one??? (By default it seems to select the first... I'm not sure if this is how attribute hierarchy works in html?)

Using the example below...

Query: "./@href"
Tag:
Expected Result: "2.html"
Result: "1.html"

+2  A: 

Then you get a

Warning: DOMDocument::loadXML(): Attribute href redefined in Entity
message on load()/loadxml()
W3C says:

When more than one definition is provided for the same attribute of a given element type, the first declaration is binding and later declarations are ignored.
VolkerK
excellent! - the easiest answers are sometimes the hardest to find. Thanks for the link too
EddyR