Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2005

Tip: Looking for answers? Try searching our database.

what's wrong with Xerces Parser????

Thread view: 
Elhanan - 08 Mar 2005 17:59 GMT
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??
Daniel Tryba - 08 Mar 2005 22:13 GMT
> 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));


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.