The Artima Developer Community
Sponsored Link

The Human Side of XML
A Conversation with Elliotte Rusty Harold, Part VIII
by Bill Venners
September 8, 2003

<<  Page 3 of 3

Advertisement

Readability of XML Documents

Bill Venners: <?xml version="1.0" standalone="yes"?><deepquestion>To what extent is XML suitable for tasks in which humans, not just software, will be reading the documents?</deepquestion>

Elliotte Rusty Harold: <?xml version="1.0" standalone="yes"?><thoughtfulresponse>I think XML is clearly suitable for both tasks. I wrote an entire book in XML using a text editor. I wrote the next book in OpenOffice Writer, a traditional GUI word processor. I think the first book, written in XML, was much easier to write. <shamelessplug>Processing XML with Java</shamelessplug> was written in DocBook using JEdit, BBEdit, and UltraEdit -- plain vanilla text editors with no understanding of XML whatsoever. And I think that worked well for me. Certainly it works well for a developer, somebody with a developer's mind. Would I necessarily give this to a secretary and ask them to write XML? Maybe not, but I have known secretaries who spent their day typing TeX. And certainly XML is easier to use than TeX.</thoughtfulresponse>

Bill Venners: <?xml version="1.0" standalone="yes"?><sizematters>I have no problem reading the small XML documents that I have for each HTML page on my web site. They are flat XML documents with a dozen or so elements for the title, subtitle, author, and so on. I edit those files by hand with vi mostly, and it works great. On the other hand, I tend to get lost in Ant files. When I look up how to do something with Ant, the syntax often seems hairy and difficult. XML doesn't seem as natural to me as a traditional context free grammar. I think people sometimes use XML in places where a traditional context free grammar would be better.</sizematters>

Elliotte Rusty Harold: <?xml version="1.0" standalone="yes"?><syntaxmatters>You can certainly develop an obfuscated syntax in XML, a syntax that is hard to read -- just as you can in other languages. <obfuscatedsyntax><And>Just</And> <he>putting</he> <slams>something</slams> <the>into</the> <point>XML</point> <home>does</home> <with>not</with> <an>automatically</an> <innovative>make</innovative> <self-referential>it</self-referential> <example>clear</example></obfuscatedsyntax>. But I think in general with sufficient effort and care and thought, you can design XML formats that are plausible to read and plausible to understand.</syntaxmatters>

Next Week

Come back Monday, September 15 for the next installment of a conversation with C# creator Anders Hejlsberg. The final installment of this conversation with Elliotte Rusty Harold will appear September 22. If you'd like to receive a brief weekly email announcing new articles at Artima.com, please subscribe to the Artima Newsletter.

Talk Back!

Have an opinion about the design principles presented in this article? Discuss this article in the News & Ideas Forum topic, The Human Side of XML.

Resources

Elliotte Rusty Harold is author of Processing XML with Java: A Guide to SAX, DOM, JDOM, JAXP, and TrAX, which is available on Amazon.com at:
http://www.amazon.com/exec/obidos/ASIN/020161622X/

XOM, Elliotte Rusty Harold's XML Object Model API:
http://www.cafeconleche.org/XOM/

Cafe au Lait: Elliotte Rusty Harold's site of Java News and Resources:
http://www.cafeaulait.org/

Cafe con Leche: Elliotte Rusty Harold's site of XML News and Resources:
http://www.cafeconleche.org/

JDOM:
http://www.jdom.org/

DOM4J:
http://www.dom4j.org/

SAX, the Simple API for XML Processing:
http://www.saxproject.org/

DOM, the W3C's Document Object Model API:
http://www.w3.org/DOM/

ElectricXML:
http://www.themindelectric.com/exml/

Sparta:
http://sparta-xml.sourceforge.net/

Common API for XML Pull Parsing:
http://www.xmlpull.org/

NekoPull:
http://www.apache.org/~andyc/neko/doc/pull/

Xerces Native Interface (XNI):
http://xml.apache.org/xerces2-j/xni.html

TrAX (Tranformation API for XML):
http://xml.apache.org/xalan-j/trax.html

Jaxen (a Java XPath engine):
http://jaxen.org/

RELAX NG:
http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=relax-ng

<<  Page 3 of 3


Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us