testing XML structure
1 posts in topic
Flat View  Flat View

Posted By:   first_last
Posted On:   Tuesday, April 25, 2006 11:18 AM

is there any kind of expansion to JUnit or anything else to help testing a XML tree/document?

I have many methods that receive entire XML trees, transform them and return the new one... I want a faster method to test the result than doing a per-node test.

something like testing the XML against a DTD would be very helpful...

any ideas/suggestions?

Re: testing XML structure

Posted By:   Robert_Lybarger  
Posted On:   Wednesday, April 26, 2006 07:59 AM

There are a couple ways to validate a document against a DTD. Personally I like the "dom4j" collection of tools. Google for them and for a couple examples; from what little I have seen, loading and validating a document with that API is among the easiest to work with. (The in-built Java classes are a little more verbose in actual practice, but that's just my opinion.)
About | Sitemap | Contact