The Extensible Markup Language (XML) : An Applied Tutorial Kevin Thomas
The Extensible Markup Language (XML) : An Applied Tutorial Kevin Thomas
(XML)
An Applied Tutorial
Kevin Thomas
Presentation Outline
Elements: <hello>
Advanced Components
– CData Sections
– Processing Instructions
An Example XML Document
var attributeValue;
//get an attribute value by specific name
attributeValue = elementNode.getAttribute("articleID");
//print it out
document.writeln("Attribute value: <b>" + attributeValue +
" </b><br>");
}
Cautions with DOM
Make sure that the XML file resides in the same directory as
the html file with the JavaScript code
The Attribute node does not appear as the child node of any
other node type; it is not considered a child node of an
element