public class XMLStreamReaderPrinter
extends java.lang.Object
Constructor and Description |
---|
XMLStreamReaderPrinter() |
Modifier and Type | Method and Description |
---|---|
boolean |
printResult(javax.xml.stream.XMLStreamReader xmlr,
java.lang.StringBuffer sb) |
boolean |
printResult(javax.xml.stream.XMLStreamReader xmlr,
java.lang.String rootElement,
java.lang.StringBuffer sb)
This method reads the contents of the XMLStreamReader
and add them in an appropriate format to the StringBuffer
It determines if the content is xml or plain text as follows:
if the stream contains start document or start element it is assumed
that the content is xml, otherwise the content is plain text
|
public boolean printResult(javax.xml.stream.XMLStreamReader xmlr, java.lang.StringBuffer sb) throws javax.xml.stream.XMLStreamException
xmlr
- sb
- javax.xml.stream.XMLStreamException
public boolean printResult(javax.xml.stream.XMLStreamReader xmlr, java.lang.String rootElement, java.lang.StringBuffer sb) throws javax.xml.stream.XMLStreamException
xmlr
- rootElement
- sb
- javax.xml.stream.XMLStreamException