Save This Page
Home » dom4j-1.6.1 » org.dom4j.jaxb » [javadoc | source]
org.dom4j.jaxb
public class: JAXBReader [javadoc | source]
java.lang.Object
   org.dom4j.jaxb.JAXBSupport
      org.dom4j.jaxb.JAXBReader
Reads an XML document and creates a DOM4J tree from SAX parsing events. JAXBObjectHandler objects can be registered to automatically receive unmarshalled XML fragments. Registered {@linkorg.dom4j.ElementHandler} implementations are notified when a certain element path is encountered
Constructor:
 public JAXBReader(String contextPath) 
    Creates a new JAXBReader for the given JAXB context path. This is the Java package where JAXB can find the generated XML classes. This package MUST contain jaxb.properties!
 public JAXBReader(String contextPath,
    ClassLoader classloader) 
    Creates a new JAXBReader for the given JAXB context path, using the specified java.lang.Classloader . This is the Java package where JAXB can find the generated XML classes. This package MUST contain jaxb.properties!
Method from org.dom4j.jaxb.JAXBReader Summary:
addHandler,   addObjectHandler,   isPruneElements,   read,   read,   read,   read,   read,   read,   read,   read,   read,   removeHandler,   removeObjectHandler,   resetHandlers,   setPruneElements
Methods from org.dom4j.jaxb.JAXBSupport:
marshal,   unmarshal
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.dom4j.jaxb.JAXBReader Detail:
 public  void addHandler(String path,
    ElementHandler handler) 
    Adds the ElementHandler to be called when the specified path is encounted.
 public  void addObjectHandler(String path,
    JAXBObjectHandler handler) 
    Registers a JAXBObjectHandler that will be supplied with the unmarshalled representation of the xml fragment whenever the specified path is encounted.
 public boolean isPruneElements() 
    When 'true', the DOM4J document will not be kept in memory while parsing.
 public Document read(File source) throws DocumentException 
 public Document read(InputSource source) throws DocumentException 
 public Document read(InputStream source) throws DocumentException 
 public Document read(Reader source) throws DocumentException 
 public Document read(String source) throws DocumentException 
    Parses the the given URL or filename.
 public Document read(URL source) throws DocumentException 
    Parses the the given URL.
 public Document read(File file,
    Charset charset) throws DocumentException 
 public Document read(InputStream source,
    String systemId) throws DocumentException 
 public Document read(Reader source,
    String systemId) throws DocumentException 
 public  void removeHandler(String path) 
    Removes the ElementHandler from the event based processor, for the specified path.
 public  void removeObjectHandler(String path) 
    Removes the JAXBObjectHandler from the event based processor, for the specified element path.
 public  void resetHandlers() 
 public  void setPruneElements(boolean pruneElements) 
    Set to true when DOM4J elements must immediately be pruned from the tree. The Document will not be available afterwards!