Node Selector is a subset of the XPath expression, used to identify a specific element or attribute of the XML document.
Node Selector enables the selection of XML document elements from the document, element, or attribute level. Using Node Selector you can specify the desired element you want to retrieve, store, or alter.
A document is stored in the XDMS with the following XCAP URI: http://xdms.example.com/services/resource-lists/global/example.xml
<?xml version="1.0" encoding="UTF-8"?> <resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists"> <list name="friends"> <entry uri="sip:friend1@example.com"> <display-name>My Friend1</display-name> </entry> <entry uri="sip:friend2@example.com"> <display-name>My Friend2</display-name> </entry> <entry uri="sip:friend3@example.com"> <display-name>My Friend3</display-name> </entry> <entry uri="sip:friend4@example.com"> <display-name>My Friend4</display-name> </entry> <entry uri="sip:friend5@example.com"> <display-name>My Friend5</display-name> </entry> <entry uri="sip:friend6@example.com"> <display-name>My Friend6</display-name> </entry> <entry uri="sip:friend7@example.com"> <display-name>My Friend7</display-name> </entry> <entry uri="sip:friend8@example.com"> <display-name>My Friend8</display-name> </entry> <entry uri="sip:friend9@example.com"> <display-name>My Friend9</display-name> </entry> </list> </resource-lists>
In bold, the example shows the document root resource-lists with the name space urn:ietf:params:xml:ns:resource-lists. Following the document root statement is an element called list, and the attribute name with the value friends. Nested elements named entry with the attribute uri, in the bolded instance the uri attribute has the value sip:friend1@example.com.
A full node selector statement will have the following format: XCAP_URL/~~/root-element/element[@name="attributevalue"]
/resource-lists/list[@name="friends"]/entry[@uri="sip:friend1@example.com"]