XML DOM Example


XML DOM Parsing

The following example uses an XML file。


Instance Explanation


XML DOM Properties and Methods

The following example uses an XML file。
FunctionloadXMLDoc(), in external JavaScript, used to load XML files.
FunctionloadXMLString()In external JavaScript, used to load XML strings.


Instance Explanation


XML DOM Accessing Nodes

The following example uses an XML file。
FunctionloadXMLDoc(), in external JavaScript, used to load XML files.





Instance Explanation


XML DOM Node Information

The following example uses an XML file。
FunctionloadXMLDoc(), in external JavaScript, used to load XML files.




Instance Explanation


XML DOM Node Lists and Attribute Lists

The following example uses an XML file。
FunctionloadXMLDoc(), in external JavaScript, used to load XML files.



Instance Explanation


XML DOM Node Tree Traversal

The following example uses an XML file。
FunctionloadXMLString()In external JavaScript, used to load XML strings.

Instance Explanation


XML DOM Browser Differences

The following example uses an XML file。
FunctionloadXMLDoc(), in external JavaScript, used to load XML files.

Display the length of the node list - Different results in IE and other browsers

Instance Explanation


XML DOM Navigating Nodes

The following example uses an XML file。
FunctionloadXMLDoc(), in external JavaScript, used to load XML files.





Instance Explanation


XML DOM Get Node Value

The following example uses an XML file。
FunctionloadXMLDoc(), in external JavaScript, used to load XML files.


Instance Explanation


XML DOM Change Node Value

The following example uses an XML file。
FunctionloadXMLDoc(), in external JavaScript, used to load XML files.



Instance Explanation


XML DOM Removing Nodes

The following example uses an XML file。
FunctionloadXMLDoc(), in external JavaScript, used to load XML files.






Instance Explanation


XML DOM Replacing Nodes

The following example uses an XML file。
FunctionloadXMLDoc(), in external JavaScript, used to load XML files.


Instance Explanation


XML DOM Creating Nodes

The following example uses an XML file。
FunctionloadXMLDoc(), in external JavaScript, used to load XML files.






Instance Explanation


XML DOM Adding Nodes

The following example uses an XML file。
FunctionloadXMLDoc(), in external JavaScript, used to load XML files.




Instance Explanation


XML DOM Cloning Nodes

The following example uses an XML file。
FunctionloadXMLDoc(), in external JavaScript, used to load XML files.

Instance Explanation


XML DOM XMLHttpRequest Object


Create a simple XMLHttpRequest and retrieve data from a TXT file.


Retrieve the header information of the resource (file).

Retrieve specified header information via getResponseHeader()
Retrieve the specified header information of a resource (file).


When a user types characters in an input field, how does the web page communicate with the web server?


How does a web page extract information from a database through the XMLHttpRequest object?


Create an XMLHttpRequest to retrieve data from an XML file and display the data in an HTML table.

Instance Explanation


other extensions