XML DOM: Difference between revisions
Jump to navigation
Jump to search
Line 23: | Line 23: | ||
A simpler-to-handle XML structure would be composed of elements that contain text, or other elements, but not both. | 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 |
Revision as of 00:17, 11 November 2016
External
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