Save This Page
Home » dom4j-1.6.1 » org.dom4j.io » [javadoc | source]
org.dom4j.io
public class: XPP3Reader [javadoc | source]
java.lang.Object
   org.dom4j.io.XPP3Reader

XPP3Reader is a Reader of DOM4J documents that uses the fast XML Pull Parser 3.x . It is very fast for use in SOAP style environments.

Constructor:
 public XPP3Reader() 
 public XPP3Reader(DocumentFactory factory) 
Method from org.dom4j.io.XPP3Reader Summary:
addHandler,   createReader,   getDispatchHandler,   getDocumentFactory,   getXPPFactory,   getXPPParser,   parseDocument,   read,   read,   read,   read,   read,   read,   read,   read,   removeHandler,   setDefaultHandler,   setDispatchHandler,   setDocumentFactory,   setXPPFactory
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.dom4j.io.XPP3Reader Detail:
 public  void addHandler(String path,
    ElementHandler handler) 
    Adds the ElementHandler to be called when the specified path is encounted.
 protected Reader createReader(InputStream in) throws IOException 
    Factory method to create a Reader from the given InputStream.
 protected DispatchHandler getDispatchHandler() 
 public DocumentFactory getDocumentFactory() 
    DOCUMENT ME!
 public XmlPullParserFactory getXPPFactory() throws XmlPullParserException 
 public XmlPullParser getXPPParser() throws XmlPullParserException 
 protected Document parseDocument() throws IOException, DocumentException, XmlPullParserException 
 public Document read(File file) throws IOException, DocumentException, XmlPullParserException 

    Reads a Document from the given File

 public Document read(URL url) throws IOException, DocumentException, XmlPullParserException 

    Reads a Document from the given URL

 public Document read(String systemID) throws IOException, DocumentException, XmlPullParserException 

    Reads a Document from the given URL or filename.

    If the systemID contains a ':' character then it is assumed to be a URL otherwise its assumed to be a file name. If you want finer grained control over this mechansim then please explicitly pass in either a URL or a File instance instead of a String to denote the source of the document.

 public Document read(InputStream in) throws IOException, DocumentException, XmlPullParserException 

    Reads a Document from the given stream

 public Document read(Reader reader) throws IOException, DocumentException, XmlPullParserException 

    Reads a Document from the given Reader

 public Document read(char[] text) throws IOException, DocumentException, XmlPullParserException 

    Reads a Document from the given array of characters

 public Document read(InputStream in,
    String systemID) throws IOException, DocumentException, XmlPullParserException 

    Reads a Document from the given stream

 public Document read(Reader reader,
    String systemID) throws IOException, DocumentException, XmlPullParserException 

    Reads a Document from the given Reader

 public  void removeHandler(String path) 
    Removes the ElementHandler from the event based processor, for the specified path.
 public  void setDefaultHandler(ElementHandler handler) 
    When multiple ElementHandler instances have been registered, this will set a default ElementHandler to be called for any path which does NOT have a handler registered.
 protected  void setDispatchHandler(DispatchHandler dispatchHandler) 
 public  void setDocumentFactory(DocumentFactory documentFactory) 

    This sets the DocumentFactory used to create new documents. This method allows the building of custom DOM4J tree objects to be implemented easily using a custom derivation of DocumentFactory

 public  void setXPPFactory(XmlPullParserFactory xPPfactory)