File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes a problem about transforming Big xml to HTML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "a problem about transforming Big xml to HTML" Watch "a problem about transforming Big xml to HTML" New topic

a problem about transforming Big xml to HTML


Joined: Dec 11, 2001
Posts: 1
dear all.
i try to get data from database
and then using sax api to generate xml file
transformerHandler.setResult(new streamResult(response.getWriter()));

and then if i try to access this servler/jsp
it will show the xml file
but usually it will show only half of the xml
and show the wrong message about syntax wrong in this xml........
i try to write in Dom or SAX api
but it will happened sometimes.........

best regards
Balaji Loganathan
author and deputy

Joined: Jul 13, 2001
Posts: 3150
Can you able to store the generated xml file into a a file instead of showing directly online ?
there may be chance that your xml data may contain some non-unicode characters which makes your browser to showonly half.
Try to store the xml file and see whether the xml is well formed.
Does your program throws any exception ??

Spritle Software Blogs
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
You can get a lot out of SAX exceptions but you have to handle them separately - do you set an errorHandler?
I agree. Here's the link:
subject: a problem about transforming Big xml to HTML
jQuery in Action, 3rd edition