XML DOM: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:


* https://www.w3.org/DOM/
* 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=
Line 7: Line 8:
* [[XML#Subjects|XML]]
* [[XML#Subjects|XML]]
* [[JAXP DOM]]
* [[JAXP DOM]]
* [[JAXP DOM Reference]]


=Overview=
=Overview=
Line 23: Line 25:


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
* processing instructions (<? ... ?>)
* comments

Latest revision as of 02:59, 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
  • processing instructions (<? ... ?>)
  • comments