-1

My Question is that How can i convert a xml file in to html using java code without using xslt functionality,and should be displayed as similar.

Please help us,i am very frustrated.

  • DOM, SAX, [regex](http://stackoverflow.com/questions/8577060/why-is-it-such-a-bad-idea-to-parse-xml-with-regex), there are many choices. – Quentin Nov 15 '13 at 16:57
  • if we use regex or Sax then we have to do lot of modification in xml,but i need very less change in xml. – user2997111 Nov 15 '13 at 17:06
  • It's a bit like asking how to cut your hedge without a hedge-trimmer. It can be done (use nail scissors), but the attempt will cause frustration. – Michael Kay Nov 15 '13 at 18:44

1 Answers1

0

It isn't quite Java, but I have found Groovy's XMLSlurper and MarkupBuilder to be quite powerful for this purpose. The syntax is close enough to Java where there is no real learning curve.

See here and here.

Vidya
  • 29,932
  • 7
  • 42
  • 70