| java.lang.Object com.lowagie.text.xml.simpleparser.SimpleXMLParser
SimpleXMLParser | public class SimpleXMLParser (Code) | | A simple XML and HTML parser. This parser is, like the SAX parser,
an event based parser, but with much less functionality.
The parser can:
- It recognizes the encoding used
- It recognizes all the elements' start tags and end tags
- It lists attributes, where attribute values can be enclosed in single or double quotes
- It recognizes the
<[CDATA[ ... ]]> construct
- It recognizes the standard entities: &, <, >, ", and ', as well as numeric entities
- It maps lines ending in
\r\n and \r to \n on input, in accordance with the XML Specification, Section 2.11
|
attributevalue | String attributevalue(Code) | | the attribute value.
|
character | protected int character(Code) | | The current character.
|
columns | protected int columns(Code) | | the column where the current character occurs
|
entity | protected StringBuffer entity(Code) | | current entity (whatever is encountered between & and ;)
|
eol | protected boolean eol(Code) | | was the last character equivalent to a newline?
|
html | protected boolean html(Code) | | Are we parsing HTML?
|
lines | protected int lines(Code) | | the line we are currently reading
|
nested | int nested(Code) | | Keeps track of the number of tags that are open.
|
previousCharacter | protected int previousCharacter(Code) | | The previous character.
|
quoteCharacter | protected int quoteCharacter(Code) | | the quote character that was used to open the quote.
|
state | protected int state(Code) | | the current state
|
escapeXML | public static String escapeXML(String s, boolean onlyASCII)(Code) | | Escapes a string with the appropriated XML codes.
Parameters: s - the string to be escaped Parameters: onlyASCII - codes above 127 will always be escaped with &#nn; if true the escaped string |
parse | public static void parse(SimpleXMLDocHandler doc, InputStream in) throws IOException(Code) | | Parses the XML document firing the events to the handler.
Parameters: doc - the document handler Parameters: in - the document. The encoding is deduced from the stream. The stream is not closed throws: IOException - on error |
|
|