//get value of attribute of element selected by other attribute
xpathElementAttribute(content, "/Employees/Employee[@id=3]", "code") //returns EMPL3
xpathElementAttribute(content, "/Employees/Employee[@id=4]", "code", "utf-8") //returns EMPL4
//get text content of element selected by parent's attribute
xpathElementContent(content, "/Employees/Employee/age[ancestor::Employee[@id=4]]", "utf-8") //returns 25
//get text content of first employee element
xpathElementContent(content, "/Employees/Employee/age") //returns 40 |