i have an application which generates test case results in the form of HTML table.
I need to convert this html table data into JUnit XML format for some other usage.
How can I parse each entry in of a table. I have browsed over internet, people are commenting other posts to conver html to xhtml which is xml equivalent but this doesn’t suffice my requirement. I want the xml to be based on Junit xsd schema
You need a two step process. Use an HTML parser to create a DOM. There’s lots to choose from in Java
When you’ve parsed the HTML and got a DOM, you can transform it into the XML form you want, either by hand code, or by using a transformation language like XSLT. Xalan is typically the library you want for performing XSLT transforms in Java.