Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Java SAX parser. How to get the raw XML code of the currently parsing event [Thread Next] Re: Java SAX parser. How to get the raw XML code of the currently parsing eventTo: NULL Date: 8/3/2008 6:54:00 PM
SAX is a bit outdated... try either Pull or VTD-XML (http://vtd-xml.sf.net)
"PatlaDJ" <patladj@g...> wrote in message
news:2aaf86a4-5a78-4334-a607-8cdc1a4d9082@a......
> Java SAX parser, please need a clue how to get the raw XML code of the
> currently parsing event... needed for logging, debugging purposes.
>
> Here's and example, letting me clarify exactly what i need: (see the
> comments in source)
>
> public void startElement(String uri, String localName, String qName,
> Attributes attributes) throws SAXException {
> //..Here... or maybe somewhere elsewhere I need on my disposal the raw
> XML code of every XML tags received from the XML stream.
> //.. I need simply to write them down in a log file, for debugging
> purposes, while parsing.
> //.. Can anyone give me a suggestion how can i do that logging while
> the SAX parser only returns me the tagname and attributes. While
> parsing I want to log the XML code for every tag in its 'pure form',
> like it is comming from the server directly on the socket's input
> reader.
>
> if ("p".equals(qName)) {
> //Do
> something...
> }
>
> }
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
