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 it down
//..in a log file, for debugging purposes, while parsing. Can anyone give me a suggestion
//..how can i implement such 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)) {
etc...
}
}
Than you in advance.