Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to convert XML into HTML?

 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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


Thanks & best regards
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul. I sent the file to web service provider to check it.

Best Regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic