The XML Pointer Language (XPointer) is the language to be used as the basis for a fragment identifier for any URI reference that locates a resource of Internet media type text/xml or application/xml.
XPointer, is based on the XML Path Language (XPath). It supports addressing the internal structures of XML documents. XPointer allows us to examine a hierarchical document structure and choose internal parts based on various properties, such as element types, attribute values, character content, and relative position. In particular, it provides for specific reference to elements, character strings, and other parts of XML documents, whether or not they bear an explicit ID attribute.
The structures located with XPointer can be used as link targets or for any other application-specific purpose. This specification does not constrain what uses an application makes of locations identified by XPointers. In particular, implementation of traversal to a resource is not constrained by this specification, and whether user "traversal" is the purpose of an XPointer at all is application-dependent. A formatted-text browser traversal might scroll to and highlight the designated location while a search application, parser, archival system, or expert agent might use XPointers for other purposes entirely. Linking mechanisms are defined in a related specification called XLink.
XPointer is built on top of the XML Path Language, XPath. XPointer extends XPath to allow us to address points and ranges as well as whole nodes, locate information by string matching, and use addressing expressions in URI references as fragment identifiers (after URI-escaping).