JavaScript XML
<?xml version="1.0" encoding="ISO-8859-1"?> <contacts> <contact name="Able Baker"><email>able@example.com</email></contact> <contact name="Careful Dodger"><email>dodger@example.com</email></contact> <contact name="Eager Framer" personal="true"><email>framer@example.com</email></contact> </contacts>Let context = contacts:
contact set of all <contact> tags.contact[1] first <contact> tag.contact[last()] last <contact> tag.contact/email all <email> children of <contact>contact/@name value of name attribute of contact childrencontact[@personal="true"] all <contact> tags with attribute personal = "true"9 of 10