Sunday, May 15, 2005

XML Exam Fever Contd.... (XPATH)

Well one of the basics that we keep on forgettins is to learn XSL we need to know XPATH,
XPATH could be thougt of as like traversing the unix file tree structure and commands to traverse the tree

XPATH identifies the following 7 types of nodes
i) The root
ii) Elements nodes
iii) Attribute nodes
iv) text nodes
v) Comment nodes
vi) Processing instruction nodes
vii) Namespace nodes

XPATH is used to traverse the XML document or parts of the XML document.
XML declaration and the DTD are not addressable via XPATH.

The grammar of XPATH could be shown in this fashion

location-path: "/"? location-step ( "/" location-step )*;
location-step: axis "::" node-test ( "[" predicate "]" )*;

No comments: