From: Robert Klemme Date: 2005-09-23T05:31:39+09:00 Subject: Re: Identifying where bad XML is Ben Burdick wrote: > I am somewhat new to ruby and would appreciate any help on this > matter. I have a custom assertion for running tests > "assert_valid_xml_response" - which will parse the output and check > for any bad xml.. > > My problem is, that with many changes constantly taking place, and > many of these assertions taking place, it is sometimes hard to > pinpoint exactly where the bad XML is hiding. > > Has anyone stumbled across a solution to easily zero in on the > location of bad XML? What exactly do you mean by "bad"? Do you mean "ill formed"? In that case any decent XML parser (validating and non validating) should give you information about where it chokes. If you mean by "bad" that it doesn't fit an XML Schema or DTD then a validating parser should point you where the error lies. Kind regards robert