OpenEdge Development: Working with XML - Product ...
OpenEdge Development: Working with XML - Product ...
OpenEdge Development: Working with XML - Product ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Reading and Writing <strong>XML</strong> <strong>with</strong> the Document Object Model (DOM)<br />
<strong>XML</strong> terminology<br />
2–2<br />
The following overview is a refresher of key <strong>XML</strong> terms and concepts that occur throughout<br />
this manual. It is provided to ensure the manual’s use of familiar <strong>XML</strong> terminology matches<br />
your own, but it is not a substitute for an <strong>XML</strong> tutorial. If you are unfamiliar <strong>with</strong> <strong>XML</strong>, see<br />
Chapter 1, “Developing <strong>with</strong> <strong>XML</strong> in <strong>OpenEdge</strong>,” for <strong>XML</strong> learning suggestions.<br />
The Extensible Markup Language (<strong>XML</strong>) is a data format for structured document interchange<br />
on the Web and other networks. It is hardware-architecture neutral and application independent.<br />
<strong>XML</strong> documents are composed of storage units called elements that contain either parsed or<br />
unparsed data. Parsed data is made up of characters, some of which form character data, and<br />
some of which form markup. Markup encodes a description of a document’s storage layout and<br />
logical structure.<br />
<strong>XML</strong> document structure<br />
This section introduces the terms used to describe the parts of an <strong>XML</strong> document, starting at the<br />
top level and working down to the smallest parts.<br />
<strong>XML</strong> documents are made up of two parts, called the prolog and the body.<br />
<strong>XML</strong> prolog<br />
The prolog contains optional information such as the <strong>XML</strong> version the document conforms to,<br />
information about the character encoding used to encode the contents of the document, and a<br />
reference to either a document type definition (DTD) or <strong>XML</strong> Schema document which describes<br />
the grammar and vocabulary of the document. The <strong>XML</strong> Schema document is the more modern<br />
way to describe <strong>XML</strong> grammar and vocabulary. <strong>XML</strong> Schemas and DTDs are usually stored in<br />
external documents and the prolog can reference both <strong>XML</strong> Schemas and DTDs.<br />
This simple example illustrates the prolog:<br />
<br />
<br />
<strong>XML</strong> body<br />
The body contains a single top-level element called the root element, which contains all other<br />
elements and other markup information.<br />
This simple example illustrates the prolog and body, where addresses is the root element and<br />
encloses the entire body, or content, of the <strong>XML</strong> document:<br />
<br />
<br />
<br />
...<br />
...<br />
...<br />