You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by ri...@cardsetc.com on 2001/04/30 09:41:41 UTC
SOAP requires Xerces: breaks XmlDocument?
Dear All,
I've encountered a most infuriating stand-off with DOM: I've managed to get
back my SOAP response, open it up, yank out the XML, parse it into a DOM
tree, and insert a new Node into it, and now all I need to do is write it
back out as XML again.
I'd have thought this would be easy, and indeed according to all the
examples I can use com.sun.xml.tree.XmlDocument to do just that, but every
time I instantiate one I get a NullPointerException. I'm pretty sure this
is because, according to a line in the docs, XmlDocument needs SUN'S XML
parser (which apparently implements a static method or something).
Anyway, I don't mind either way (i.e. use XmlDocument or use Xerces), but I
REALLY need to output my DOM tree as XML. Surely this shouldn't be that
difficult?
Any help would be much appreciated - many thanks in advance,
Richard.
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org
Re: SOAP requires Xerces: breaks XmlDocument?
Posted by "mr_gopinath@yahoo.com" <mr...@yahoo.com>.
Hi,
You can use org.apache.xml.serialize.XMLSerialize class to serialize
DOM tree to xml format to any writer. This is outside the xerces
package and I think it uses only DOM APIs to serialize, no xerces
specific APIs are used. I hope it helps.
regards,
Gopinath M.R.
Aztec software,
Bangalore,India
richard.kennard@cardsetc.com wrote:
>
> Dear All,
>
> I've encountered a most infuriating stand-off with DOM: I've managed to get
> back my SOAP response, open it up, yank out the XML, parse it into a DOM
> tree, and insert a new Node into it, and now all I need to do is write it
> back out as XML again.
>
> I'd have thought this would be easy, and indeed according to all the
> examples I can use com.sun.xml.tree.XmlDocument to do just that, but every
> time I instantiate one I get a NullPointerException. I'm pretty sure this
> is because, according to a line in the docs, XmlDocument needs SUN'S XML
> parser (which apparently implements a static method or something).
>
> Anyway, I don't mind either way (i.e. use XmlDocument or use Xerces), but I
> REALLY need to output my DOM tree as XML. Surely this shouldn't be that
> difficult?
>
> Any help would be much appreciated - many thanks in advance,
>
> Richard.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org
Re: SOAP requires Xerces: breaks XmlDocument?
Posted by Dmitri Colebatch <di...@nuix.com.au>.
Richard,
Ok - new on the list, and to the whole SOAP thing, but from what I understand
you're getting an org.w3c.dom.Element object? If so, you can use JDOM
(http://www.jdom.org) to build your tree and do as you please with it. Might
be a bit of an overkill given how far you've got... but if you just want it
to work... (o:
hope this helps.
cheers
dim
On Mon, 30 Apr 2001 17:41, richard.kennard@cardsetc.com wrote:
> Dear All,
>
> I've encountered a most infuriating stand-off with DOM: I've managed to get
> back my SOAP response, open it up, yank out the XML, parse it into a DOM
> tree, and insert a new Node into it, and now all I need to do is write it
> back out as XML again.
>
> I'd have thought this would be easy, and indeed according to all the
> examples I can use com.sun.xml.tree.XmlDocument to do just that, but every
> time I instantiate one I get a NullPointerException. I'm pretty sure this
> is because, according to a line in the docs, XmlDocument needs SUN'S XML
> parser (which apparently implements a static method or something).
>
> Anyway, I don't mind either way (i.e. use XmlDocument or use Xerces), but I
> REALLY need to output my DOM tree as XML. Surely this shouldn't be that
> difficult?
>
> Any help would be much appreciated - many thanks in advance,
>
> Richard.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org
Re: SOAP requires Xerces: breaks XmlDocument?
Posted by Dmitri Colebatch <di...@nuix.com.au>.
Richard,
Ok - new on the list, and to the whole SOAP thing, but from what I understand
you're getting an org.w3c.dom.Element object? If so, you can use JDOM
(http://www.jdom.org) to build your tree and do as you please with it. Might
be a bit of an overkill given how far you've got... but if you just want it
to work... (o:
hope this helps.
cheers
dim
On Mon, 30 Apr 2001 17:41, richard.kennard@cardsetc.com wrote:
> Dear All,
>
> I've encountered a most infuriating stand-off with DOM: I've managed to get
> back my SOAP response, open it up, yank out the XML, parse it into a DOM
> tree, and insert a new Node into it, and now all I need to do is write it
> back out as XML again.
>
> I'd have thought this would be easy, and indeed according to all the
> examples I can use com.sun.xml.tree.XmlDocument to do just that, but every
> time I instantiate one I get a NullPointerException. I'm pretty sure this
> is because, according to a line in the docs, XmlDocument needs SUN'S XML
> parser (which apparently implements a static method or something).
>
> Anyway, I don't mind either way (i.e. use XmlDocument or use Xerces), but I
> REALLY need to output my DOM tree as XML. Surely this shouldn't be that
> difficult?
>
> Any help would be much appreciated - many thanks in advance,
>
> Richard.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org
Re: SOAP requires Xerces: breaks XmlDocument?
Posted by "mr_gopinath@yahoo.com" <mr...@yahoo.com>.
Hi,
You can use org.apache.xml.serialize.XMLSerialize class to serialize
DOM tree to xml format to any writer. This is outside the xerces
package and I think it uses only DOM APIs to serialize, no xerces
specific APIs are used. I hope it helps.
regards,
Gopinath M.R.
Aztec software,
Bangalore,India
richard.kennard@cardsetc.com wrote:
>
> Dear All,
>
> I've encountered a most infuriating stand-off with DOM: I've managed to get
> back my SOAP response, open it up, yank out the XML, parse it into a DOM
> tree, and insert a new Node into it, and now all I need to do is write it
> back out as XML again.
>
> I'd have thought this would be easy, and indeed according to all the
> examples I can use com.sun.xml.tree.XmlDocument to do just that, but every
> time I instantiate one I get a NullPointerException. I'm pretty sure this
> is because, according to a line in the docs, XmlDocument needs SUN'S XML
> parser (which apparently implements a static method or something).
>
> Anyway, I don't mind either way (i.e. use XmlDocument or use Xerces), but I
> REALLY need to output my DOM tree as XML. Surely this shouldn't be that
> difficult?
>
> Any help would be much appreciated - many thanks in advance,
>
> Richard.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org