• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a problem about transforming Big xml to HTML

 
koji
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear all.
i try to get data from database
and then using sax api to generate xml file
like:
transformerHandler.setResult(new streamResult(response.getWriter()));
transformerHandler.startElement();
.
transformerHandler.characters(rs.getString("Mydata"),0,length);
.
transformerHandler.endElement();

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
koji
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ??
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can get a lot out of SAX exceptions but you have to handle them separately - do you set an errorHandler?
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic