At 14.45 21/05/2004 +0200, Andreas Karlsson wrote:
> Hi,
>
>
> On Fri, 21 May 2004, [iso-8859-1] Andreas Karlsson
> wrote:
>
> > When I use the same DOMBuilder object for parsing
> > several XML files, thus building several DOM trees
> for
> > the same parser, the latter document gets an
> illegal
> > pointer and there is no way of accessing the
> > DOMDocument. Could this be happening due to an old
> > version of Xerces (2.1.0.)?
>
> Could be, but try calling reset.
>
> >
> > Further more; is there any way of separating
> > DOMDocuments from their DOMBuilder object,
>
> yes, adoptDocument
>

This may be a inept question but how do you construct
a AbstractDOMParser in order to adoptDocument?

adoptDocument is available on the XercesDOMParser parser; if you want to use the DOML3-compliant DOMBuilder, you have to invoke DOMBuilder::setFeature(XMLUni::fgXercesUserAdoptsDOMDocument, true) and the DOMDocument returned by parse() will not be stored inside the DOMBuilder (clearly you will be responsible for deleting it).


Alberto



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to