XML Parsing from Non-XML Document
- by Neel Basu
in a xml/non-xml File there may exist some XML Block that I need to parse and replace with some other string.. The Scenario is something like this..
Some Text
<cnt:use name="abc" call="xyz">
<cnt:param name="x" value="2" />
</cnt:use>
Some Text
There is no guarantee that the document is a proper XML document. (there may exist some unclosed Tags. or some other common mistakes that a Stupid people can make while typing HTML). so I can't use SAX or DOM. I can't even pass it to XSLT (am I right ?). So Whats the best way to extract the <cnt:*> part from the non-xml Document. and read it then replace with something else.