Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Writing Xml

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Henri Yandell <bayard AT generationjava.com>
  • To: <xom-interest AT lists.ibiblio.org>
  • Subject: [XOM-interest] Writing Xml
  • Date: Wed, 18 Sep 2002 17:50:44 -0400 (EDT)

XOM looks like it follows a generic DOM-concept of building a memory
structure. However the serialiser feels too weak to me.

From my limited focus on it it seems to suffer from the DOM-style problem
of needing an XML document in memory before you can write it out. This may
work nicely for bits that are in the middle of an xml chain, ie) they read
xml then write it, but doesn't feel right [ie) not like a java.io.Writer]
when at the beginning of a chain and hogs memory when creating the initial
xml objects from a database or memory source.

Any chance of something with an easier to use format:

such as:

writer.openElement("document");
writer.writeAttribute("name", "bob.text");
writer.openElement("title").writeAttribute("value","Example").closeElement();
writer.closeElement();


It doesn't hog memory, it is more natural when outputting XML. [This isn't
an attempt to sell, but...] I've got such code sitting in Jakarta Commons
Util sandbox and am willing to submit it if it's of any interest.

http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/util/src/java/org/apache/commons/util/XmlWriter.java


Hen





Archive powered by MHonArc 2.6.24.

Top of Page