Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] toXML() instead of getStringForm()?

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Laurent Bihanic <laurent.bihanic AT atosorigin.com>
  • To: John Cowan <jcowan AT reutershealth.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] toXML() instead of getStringForm()?
  • Date: Fri, 20 Sep 2002 13:03:28 +0200

John Cowan wrote:
Just to nag: Why not toXMLString() (toXmlString()) to clearly mark that the output is not an XML document.

Au contraire: the output *is* an XML document, because an XML document
is a textual object. XOM is not XML.

The output is not a document: A (well-formed) XML document contains one and only one root element. Thus only Element.getStringForm() can return an XML document. For the other nodes, the method returns a string that can be part of a document.

Laurent





Archive powered by MHonArc 2.6.24.

Top of Page