Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Java SAX parser. How to get the raw XML code of the currently parsing event Java SAX parser. How to get the raw XML code of the currently parsing eventTo: NULL Date: 7/2/2008 3:47:00 PM 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 | |||
|
