com.centrasite.control.adapters.util
Class XMLStreamReaderPrinter
java.lang.Object
com.centrasite.control.adapters.util.XMLStreamReaderPrinter
public class XMLStreamReaderPrinter
- extends java.lang.Object
This class is used to load the XML Stream content,
format and add appropriat tags
Method Summary |
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 |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLStreamReaderPrinter
public XMLStreamReaderPrinter()
printResult
public boolean printResult(javax.xml.stream.XMLStreamReader xmlr,
java.lang.StringBuffer sb)
throws javax.xml.stream.XMLStreamException
- Parameters:
xmlr
- sb
-
- Returns:
- boolean indicating if stream's content is a xml document or just a plain text
- Throws:
javax.xml.stream.XMLStreamException
printResult
public boolean printResult(javax.xml.stream.XMLStreamReader xmlr,
java.lang.String rootElement,
java.lang.StringBuffer sb)
throws javax.xml.stream.XMLStreamException
- 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
- Parameters:
xmlr
- rootElement
- sb
-
- Returns:
- boolean indicating if stream's content is a xml document or just a plain text
- Throws:
javax.xml.stream.XMLStreamException