Pay for Hesitation: XML variable-access syntax

Pages

2010年8月17日 星期二

XML variable-access syntax

* : children()
.Name : child("Name")

@Name : attribute("Name")
@* : attributes()

..Name : descendants("Name");
..@ : retrieve a list of descendant attributes
..* : retrieve every single nodes from a given element
..@* : retrieve every single attributes defined both on an element and on all of its descendants.
..*.@* : retrieve every single attributes defined on an element's descendants, but not on the elements itself.


p.s. parsing from right to left.

沒有留言: