I am trying to print an XML document.I put the document on a JEditorPane but it has too many white space.It seems like JEditorPane doesnot know the XML format. What other way can I use to print the document.
Aj Manch
Ranch Hand
Joined: May 07, 2001
Posts: 50
posted
0
If you are just interested in printing the XML document, you can open it in IE (I think 5 and above). IE already has a built-in parser and therefore formats it accordingly. You can print that out from there. If that doesn't suffice your requirement, you can use XML4J or Xerces parser API to parse the XML document using Java and then you can do whatever you want. Hope that helps. AJ
bhuvan gupta
Greenhorn
Joined: Mar 26, 2001
Posts: 13
posted
0
I think Object space dxml parser can be of better use for u here .... u can parse the XML string with the dxml parser and get the XML String back again using that .. the resulted XML String will be having proper indentation ...like XML being displayed in IE
Originally posted by Aj Manch: If you are just interested in printing the XML document, you can open it in IE (I think 5 and above). IE already has a built-in parser and therefore formats it accordingly. You can print that out from there. If that doesn't suffice your requirement, you can use XML4J or Xerces parser API to parse the XML document using Java and then you can do whatever you want. Hope that helps. AJ
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.