package org.xml.sax.demo; // SAX demonstration for parsing from a UTF-16 character stream. // No warranty; no copyright -- use this as you will. // $Id: CharacterStreamDemo.java,v 1.3 1998/05/01 20:44:33 david Exp $ import org.xml.sax.Parser; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.helpers.ParserFactory; import java.io.StringReader; /** * Demonstrate parsing from a UTF-16 character stream. * *
Usage: java -Dorg.xml.sax.parser=CLASSNAME * CharacterStreamDemo
* *The SAX parser will read the document from a character * stream connected to an internal string.
* *Note that the Java implementation of SAX represents a * character stream using a Reader.
* * @see DemoHandler * @see org.xml.org.xml.sax.parser * @see org.xml.sax.InputSource * @see org.xml.sax.helpers.ParserFactory * @see java.io.StringReader */ public class CharacterStreamDemo { // This is the document, in all its glory. // In a read-world application, this // could come from a database, a text // field, or just about anywhere. final static String doc = "" + "