Download presentation
Presentation is loading. Please wait.
Published byJeffrey Booker Modified over 9 years ago
3
defined as Extensible Markup Language (XML) is a set of rules for encoding documents Defines structure and data
4
Everyday Italian Giada De Laurentiis 2005 30.00
5
A W3C standard that defines a standard way for accessing and manipulating XML documents DOM presents an XML document as a tree- structure
6
A standard programming interface for XML that is platform- and language-independent The XML DOM defines the objects and properties of all XML elements, and the methods (interface) to access them. In other words: The XML DOM is a standard for how to get, change, add, or delete XML elements.
7
According to the DOM, everything in an XML document is a node. The DOM says: The entire document is a document node Every XML element is an element node The text in the XML elements are text nodes Every attribute is an attribute node Comments are comment nodes
8
Everyday Italian Giada De Laurentiis 2005 30.00 root
9
Everyday Italian Giada De Laurentiis 2005 30.00 Book node
10
Everyday Italian Giada De Laurentiis 2005 30.00 Book node contains four other nodes
11
The XML DOM views an XML document as a tree structure called a node-tree All the nodes in the tree have a relationship to each other and can be accessed through the tree The node tree shows the set of nodes, and the connections between them. The tree starts at the root node and branches out to the text nodes at the lowest level of the tree
13
Nodes in the node tree have a hierarchical relationship to each other The terms parent, child, and sibling are used to describe the relationships. For example, Parent nodes have children
14
Children on the same level are called siblings (brothers or sisters) which are nodes with the same parent In a node tree, the top node is called the root only one root can exist in an XML file. Every node, except the root, has exactly one parent node
16
Everyday Italian Giada De Laurentiis 2005 30.00 In the XML above, the element is the first child of the element, and the element is the last child of the element Furthermore, the element is the parent node of the,,, and elements
17
Most browsers have a built-in XML parser to read and manipulate XML The parser converts XML into a JavaScript accessible object The XML DOM contains methods (functions) to traverse XML trees, access, insert, and delete nodes
18
However, before an XML document can be accessed and manipulated, it must be loaded into an XML DOM object The parser reads XML into memory* and converts it into an XML DOM object that can be accessed with JavaScript * you must clear the browser cache to update the XML file
19
Create an XMLHTTP object Open the XMLHTTP object Send an XML HTTP request to the server
21
Danger, Will Robinson, Danger!
23
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.