XML NamespacesXML Namespaces provide a method to avoid element name conflicts.
Please, see : they explain in really simple way what the "XML Namespace are.
XML and XPath The XPath language is based on a tree representation of the XML document, and provides the ability to navigate around the tree, selecting nodes by a variety of criteria. It is used to navigate through elements and attributes.
Based on the previosu XML document, you can generalyze it as follow:
XML documents have a hierarchical structure and can conceptually be interpreted as a tree structure, called an XML tree.
XML documents must contain a root element (one that is the parent of all other elements). All elements in an XML document can contain sub elements, text and attributes. The tree represented by an XML document starts at the root element and branches to the lowest level of elements.
XPath defines a syntax named XPath expressions that identifies one or more internal components (elements, attributes, etc.) of an XML document. In popular use (though not in the official specification), an XPath expression is often referred to simply as "an XPath".
Syntax and semantics (XPath 1.0) The most important kind of expression in XPath is a location path. A location path consists of a sequence of location steps. Each location step has three components:
- An axis. An "axis" specifiers indicate navigation direction within the tree representation of the XML document. The axes available are
- A node test
- Zero or more predicates.
In the table below we have listed some XPath expressions and the result of the expressions: