[jdom-interest] Philosophical XML (was API Inertia)

Elliotte Rusty Harold elharo at metalab.unc.edu
Wed May 2 09:16:10 PDT 2001

At 11:39 AM -0400 5/2/01, Paul Philion wrote:
>The below case is very simple. Element <p> contains three elements:
>- a text element with the value "This is..."
>- an element <strong>, containing one text element "word"
>- a text element containing "in the middle."

No, they're not elements. They have no start and end tags. They can't 
have attributes. They can't contain other nodes. Your mental model 
does not match what XML 1.0 actually specifies!

>Personally, I have never understood the need for "mixed content". There are
>only elements.

That's because you're thinking of data-oriented, record-oriented 
applications. These application have various other characteristics 
you're implicitly assuming; for instance, that order isn't very 

However, order, mixed content, and other features of XML are crucial 
for narrative documents such as books, articles, essays, letters, 
pamphlets, and so forth. If JDOM ignores this, then it is not a 
faithful XML API.

| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
|                  The XML Bible (IDG Books, 1999)                   |
|              http://metalab.unc.edu/xml/books/bible/               |
|   http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/   |
|  Read Cafe au Lait for Java News:  http://metalab.unc.edu/javafaq/ |
|  Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/     |

More information about the jdom-interest mailing list