XML Midterms Exam Reviewer
XML Midterms Exam Reviewer
XML DOM
Relationship of Nodes
Accessing a Node
Using looping
Other useful XML DOM functions for creating and adding nodes
• createAttribute – used for creating attributes for elements
• setAttribute – used for setting attribute values
• createText – used for creating text nodes
• createComment – used creating comment nodes
Removing and replacing a node
Removing a node
Replacing a node
XPath
• XPath is a standard way of accessing/selecting data in XML .
• It is a fundamental part of other XML related technologies such as XSLT and
XQuery .
Xpath Nodes
• XPath is also based around nodes .
• The XPath Nodes concept and relationship is similar to XML DOM nodes .
W3C Recommended
• The XPath is a W3C standard .
XPath Application
• XPath defines paths on XML documents.
• These paths are similar to the directories we use to access files on our computers.
XPath Path Expressions
The following are some of the path expressions used in XPath