Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] CDATA sections

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: John Cowan <jcowan AT reutershealth.com>
  • To: Arjan Huijzer <huijzer AT gmail.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] CDATA sections
  • Date: Wed, 5 Jan 2005 10:19:28 -0500

Arjan Huijzer scripsit:

> I am now trying to use your TagSoup parser, but I am running into some
> trouble, because TagSoup creates an entire xhtml document. But,
> instead, I just want an XML fragment containing the uploaded content.
> Is there a way to easily achieve that?

You probably don't want to use Serializer anyhow, or at least not
with the given options, because whitespace around element content is
significant in HTML. So navigate down to the body element generated by
TagSoup and use toXML() on its children. (If there isn't a body element,
the document is degenerate and you don't want to use it anyway.)

--
Real FORTRAN programmers can program FORTRAN John Cowan
in any language. --Allen Brown jcowan AT reutershealth.com




Archive powered by MHonArc 2.6.24.

Top of Page