XML DOM: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * XML =Overview= The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamical...") |
|||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=External= | |||
* https://www.w3.org/DOM/ | |||
* Document Object Model (DOM) Level 3 Core Specification https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ | |||
=Internal= | =Internal= | ||
* [[XML#Subjects|XML]] | * [[XML#Subjects|XML]] | ||
* [[JAXP DOM]] | |||
* [[JAXP DOM Reference]] | |||
=Overview= | =Overview= | ||
The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of an XML document. | The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of an XML document. | ||
=Mixed Content Model= | |||
Text and elements can be freely intermixed in a DOM hierarchy. | |||
Example: | |||
<pre> | |||
<sentence>This is an <bold>interesting</bold> idea.</sentence> | |||
</pre> | |||
A simpler-to-handle XML structure would be composed of elements that contain text, or other elements, but not both. | |||
=DOM Node Types= | |||
DOM may contain nodes of the following types: | |||
* element | |||
* text | |||
* entity reference (a pointer to an entity that is define elsewhere) | |||
* CDATA - uninterpreted data | |||
* processing instructions (<? ... ?>) | |||
* comments |
Latest revision as of 02:59, 11 November 2016
External
- https://www.w3.org/DOM/
- Document Object Model (DOM) Level 3 Core Specification https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/
Internal
Overview
The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of an XML document.
Mixed Content Model
Text and elements can be freely intermixed in a DOM hierarchy.
Example:
<sentence>This is an <bold>interesting</bold> idea.</sentence>
A simpler-to-handle XML structure would be composed of elements that contain text, or other elements, but not both.
DOM Node Types
DOM may contain nodes of the following types:
- element
- text
- entity reference (a pointer to an entity that is define elsewhere)
- CDATA - uninterpreted data
- processing instructions (<? ... ?>)
- comments