[jdom-interest] Building Dom document from a string.

bob mcwhirter bob at werken.com
Mon Jul 1 12:42:50 PDT 2002


Whoa...

DOMBuilder takes, as input, a DOM, and builds, as output, a JDOM.

Dunno why you'd need DOMBuilder to take a Reader.  Makes no sense.

SAXBuilder takes, as input, a stream of SAX events, and builds, as
output, a JDOM.  It wraps a SAX parser, which can certainly take a
Reader.

	-bob




On Mon, 1 Jul 2002, Grinvald, Edward wrote:

> Hi,
> 	StringReader is what I would use in DOM with Xerces, but JDOM
> doesn't have a DOMBuilder build method that takes a reader.
> Also, I know that performance of DOMBuilder is horrible, but I need to
> modify a dom tree (append/delete nodes), is there a way to wrap the
> SAXBuilder?
> 
> Thank You,
>  
> Edward Grinvald
> Computer Associates International
> Programmer, Storage Development
> Edward.Grinvald at ca.com
> 1-631-342-6000 x76350
> 
> 
> -----Original Message-----
> From: Jason Hunter [mailto:jhunter at servlets.com] 
> Sent: Saturday, June 29, 2002 10:57 AM
> To: Grinvald, Edward
> Cc: jdom-interest at jdom.org
> Subject: Re: [jdom-interest] Building Dom document from a string.
> 
> 
> StringReader.
> 
> -jh-
> 
> > "Grinvald, Edward" wrote:
> > 
> > Hi all,
> >     I have a small question:
> >     How do i build a document using DOMBuilder from a string that 
> > contains my xml document. I'm not sure how to do this since the 
> > StringBufferInputStream is deprecated.
> > 
> > Thank You,
> > 
> > Edward Grinvald
> > Computer Associates International
> > Programmer, Storage Development
> > Edward.Grinvald at ca.com
> > 1-631-342-6000 x76350
> >
> 

--
Bob McWhirter        bob at werken.com
The Werken Company   http://werken.com/




More information about the jdom-interest mailing list