> it took me hours to figure out, i tested on ecplise a small java
> application, that builds an XML dom, it returned the string using the
> toStrimg method, however when i turned it into a Web Service under
> tomcat 4.24 it returned null!! only then i noticed i was using
> different parsers, the first, crimson (i think it came with axis)
> worked find while the second (tomcat's) returned null, why??
Been there, done that, found the answer by searching in xerces docs for
deferred node implementations.
Elhanan - 09 Mar 2005 06:16 GMT
u mean by setting this:
http://apache.org/xml/features/dom/defer-node-expansion
to false?
but in order to change it to false
i'll need to change
http://apache.org/xml/properties/dom/document-class-name
to some other class (will is till work under tomcat?)
> > it took me hours to figure out, i tested on ecplise a small java
> > application, that builds an XML dom, it returned the string using the
[quoted text clipped - 5 lines]
> Been there, done that, found the answer by searching in xerces docs for
> deferred node implementations.
Daniel Tryba - 09 Mar 2005 11:38 GMT
Please don't TOFU
> u mean by setting this:
> http://apache.org/xml/features/dom/defer-node-expansion
> to false?
No. There are good reasons to use defered nodes (although I can't
remember which :)
> to some other class (will is till work under tomcat?)
If you want the xml as a string you should use a Transformer don't have
to know anything about the actual xml implementation, somthing like:
factory=TransformerFactory.newInstance();
transformer=factory.newTransformer();
transformer.transform(xmlSource, new StreamResult(out));