public final class SimpleXMLParser
extends java.lang.Object
The parser can:
<[CDATA[ ... ]]> construct
\r\n and \r to \n on input, in accordance with the XML Specification, Section 2.11
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
escapeXML(java.lang.String s,
boolean onlyASCII)
Escapes a string with the appropriated XML codes.
|
static void |
parse(SimpleXMLDocHandler doc,
java.io.InputStream in)
Parses the XML document firing the events to the handler.
|
static void |
parse(SimpleXMLDocHandler doc,
java.io.Reader r) |
static void |
parse(SimpleXMLDocHandler doc,
SimpleXMLDocHandlerComment comment,
java.io.Reader r,
boolean html)
Parses the XML document firing the events to the handler.
|
public static void parse(SimpleXMLDocHandler doc, SimpleXMLDocHandlerComment comment, java.io.Reader r, boolean html) throws java.io.IOException
doc - the document handlerr - the document. The encoding is already resolved. The reader is not closedjava.io.IOException - on errorpublic static void parse(SimpleXMLDocHandler doc, java.io.InputStream in) throws java.io.IOException
doc - the document handlerin - the document. The encoding is deduced from the stream. The stream is not closedjava.io.IOException - on errorpublic static void parse(SimpleXMLDocHandler doc, java.io.Reader r) throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String escapeXML(java.lang.String s,
boolean onlyASCII)
s - the string to be escapedonlyASCII - codes above 127 will always be escaped with &#nn; if trueCopyright © 2017. All Rights Reserved.