what's wrong with Xerces Parser????

E

Elhanan

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??
 
D

Daniel Tryba

Elhanan said:
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.
 
D

Daniel Tryba

Please don't TOFU

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));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top