Try OpenEdge Now
skip to main content
Working with XML
Reading and Writing XML with the Document Object Model (DOM) : XML terminology : XML document structure : XML empty elements
 
XML empty elements
An empty element is an element that is complete by itself; it never contains other elements. Rather than being composed of a start tag, data, and an end tag, the empty element is a combined start and end tag. Typically, an empty element is used as a flag of some kind or perhaps as an element that contains its information in its attributes. In this example, extension has been converted to an empty tag:
<phone>
    <entry>
        <name>Chip</name>
        <extension number="3"/>
    </entry>
</phone>