Save This Page
Home » iText-src-2.1.3 » com.lowagie » text » pdf » [javadoc | source]
com.lowagie.text.pdf
public class: SimpleXMLParser [javadoc | source]
java.lang.Object
   com.lowagie.text.pdf.SimpleXMLParser
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:

The code is based on http://www.javaworld.com/javaworld/javatips/javatip128/ with some extra code from XERCES to recognize the encoding.
Method from com.lowagie.text.pdf.SimpleXMLParser Summary:
decodeEntity,   escapeXML,   getJavaEncoding,   parse,   parse,   parse
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.pdf.SimpleXMLParser Detail:
 public static char decodeEntity(String s) 
 public static String escapeXML(String s,
    boolean onlyASCII) 
    Escapes a string with the appropriated XML codes.
 public static String getJavaEncoding(String iana) 
    Gets the java encoding from the IANA encoding. If the encoding cannot be found it returns the input.
 public static  void parse(SimpleXMLDocHandler doc,
    InputStream in) throws IOException 
    Parses the XML document firing the events to the handler.
 public static  void parse(SimpleXMLDocHandler doc,
    Reader r) throws IOException 
 public static  void parse(SimpleXMLDocHandler doc,
    SimpleXMLDocHandlerComment comment,
    Reader r,
    boolean html) throws IOException 
    Parses the XML document firing the events to the handler.