aspose file tools*
The moose likes XML and Related Technologies and the fly likes How to convert XML into HTML? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to convert XML into HTML?" Watch "How to convert XML into HTML?" New topic
Author

How to convert XML into HTML?

Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732
Hello,

I am working on a program that is sending SOAP request to resume parser company and getting response in XML shape. I have written the code to send and receive SOAP response and now its working fine but never done any conversion of XML into HTML through java. I checked some online examples, tried but failed.

Can anybody please write a code to convert this output into HTML form? I tried to attached the file here but receiving message that Files with the extension .rar,txt,xml are not allowed

Best regards
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18669
    
    8

Well, first of all my choice of technology to convert XML to HTML wouldn't be Java. I would use XSLT instead, since it's specifically designed for that task.

Second, this forum isn't a code-writing service. If you have a question about some code you have written, then go ahead and post it here with that question. You don't need to attach it, just copy it and paste it (inside the Code tags), but don't post hundreds of lines of code. Just post the part you have a question about.
Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732


This example compiles succesfully but throwing the following error at run time


Thanks & best regards
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18669
    
    8

That's just a problem due to your input file being malformed XML. In particular it appears to be encoded in UTF-8 (either because it explicitly declares itself to be encoded in UTF-8, or more likely because it doesn't declare an encoding) but in fact it isn't encoded in UTF-8.

So send the file back to whoever created it and ask them to fix the problem.
Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732
Thanks Paul. I sent the file to web service provider to check it.

Best Regards
 
 
subject: How to convert XML into HTML?