2

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

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.