| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.dom4j.io.STAXEventReader
Reads a DOM4J Document, as well as other Nodes, from a StAX
 XMLEventReader.
| Constructor Summary | |
| STAXEventReader()Constructs a default STAXEventReaderinstance with a
 defaultDocumentFactory. | |
| STAXEventReader(DocumentFactory factory)Constructs a STAXEventReaderinstance that uses the
 specifiedDocumentFactoryto construct DOM4JNodes. | |
| Method Summary | |
|  Attribute | createAttribute(Element elem,
                javax.xml.stream.events.Attribute attr)Constructs a new DOM4J Attribute from the provided StAX Attribute event. | 
|  CharacterData | createCharacterData(javax.xml.stream.events.Characters characters)Constructs a new DOM4J Text or CDATA object from the provided Characters event. | 
|  Comment | createComment(javax.xml.stream.events.Comment comment)Constructs a new DOM4J Comment from the provided StAX Comment event. | 
|  Element | createElement(javax.xml.stream.events.StartElement startEvent)Constructs a new DOM4J Element from the provided StartElement event. | 
|  Entity | createEntity(javax.xml.stream.events.EntityReference entityRef)Constructs a new DOM4J Entity from the provided StAX EntityReference event. | 
|  Namespace | createNamespace(javax.xml.stream.events.Namespace ns)Constructs a new DOM4J Namespace from the provided StAX Namespace event. | 
|  ProcessingInstruction | createProcessingInstruction(javax.xml.stream.events.ProcessingInstruction pi)Constructs a new DOM4J ProcessingInstruction from the provided StAX ProcessingInstruction event. | 
|  QName | createQName(javax.xml.namespace.QName qname)Constructs a new DOM4J QName from the provided JAXP QName. | 
|  Attribute | readAttribute(javax.xml.stream.XMLEventReader reader)Constructs a DOM4J Attribute from the provided event stream. | 
|  CharacterData | readCharacters(javax.xml.stream.XMLEventReader reader)Constructs a DOM4J Text or CDATA section from the provided event stream. | 
|  Comment | readComment(javax.xml.stream.XMLEventReader reader)Constructs a DOM4J Comment from the provided event stream. | 
|  Document | readDocument(InputStream is)Constructs a StAX event stream from the provided I/O stream and reads a DOM4J document from it. | 
|  Document | readDocument(InputStream is,
             String systemId)Constructs a StAX event stream from the provided I/O stream and reads a DOM4J document from it. | 
|  Document | readDocument(Reader reader)Constructs a StAX event stream from the provided I/O character stream and reads a DOM4J document from it. | 
|  Document | readDocument(Reader reader,
             String systemId)Constructs a StAX event stream from the provided I/O character stream and reads a DOM4J document from it. | 
|  Document | readDocument(javax.xml.stream.XMLEventReader reader)Reads a DOM4J Documentfrom the provided stream. | 
|  Element | readElement(javax.xml.stream.XMLEventReader eventReader)Reads a DOM4J Element from the provided event stream. | 
|  Entity | readEntityReference(javax.xml.stream.XMLEventReader reader)Constructs a DOM4J Entity from the provided event stream. | 
|  Namespace | readNamespace(javax.xml.stream.XMLEventReader reader)Constructs a DOM4J Namespace from the provided event stream. | 
|  Node | readNode(javax.xml.stream.XMLEventReader reader)Reads a Nodefrom the event stream. | 
|  ProcessingInstruction | readProcessingInstruction(javax.xml.stream.XMLEventReader reader)Constructs a DOM4J ProcessingInstruction from the provided event stream. | 
|  void | setDocumentFactory(DocumentFactory documentFactory)Sets the DocumentFactory to be used when constructing DOM4J nodes. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public STAXEventReader()
STAXEventReader instance with a
 default DocumentFactory.
public STAXEventReader(DocumentFactory factory)
STAXEventReader instance that uses the
 specified DocumentFactoryto construct DOM4J Nodes.
factory - The DocumentFactory to use when constructing DOM4J nodes, or
            null if a default should be used.| Method Detail | 
public void setDocumentFactory(DocumentFactory documentFactory)
documentFactory - The DocumentFactory to use when constructing DOM4J nodes, or
            null if a default should be used.
public Document readDocument(InputStream is)
                      throws javax.xml.stream.XMLStreamException
is - The I/O stream from which the Document will be read.
javax.xml.stream.XMLStreamException - If an error occurs reading content from the stream.
public Document readDocument(Reader reader)
                      throws javax.xml.stream.XMLStreamException
reader - The character stream from which the Document will be read.
javax.xml.stream.XMLStreamException - If an error occurs reading content from the stream.
public Document readDocument(InputStream is,
                             String systemId)
                      throws javax.xml.stream.XMLStreamException
is - The I/O stream from which the Document will be read.systemId - A system id used to resolve entities.
javax.xml.stream.XMLStreamException - If an error occurs reading content from the stream.
public Document readDocument(Reader reader,
                             String systemId)
                      throws javax.xml.stream.XMLStreamException
reader - The character stream from which the Document will be read.systemId - A system id used to resolve entities.
javax.xml.stream.XMLStreamException - If an error occurs reading content from the stream.
public Node readNode(javax.xml.stream.XMLEventReader reader)
              throws javax.xml.stream.XMLStreamException
Nodefrom the event stream. If the next event is a
 StartElement, all events until the closing EndElement
 will be read, and the resulting nodes will be added to the returned
 Element.
 
 
 Pre-Conditions : The stream must be positioned before an
 event other than an EndElement,EndDocument,
 or any DTD-related events, which are not currently supported.
 
reader - The reader from which events will be read.
Nodeconstructed from the read events.
javax.xml.stream.XMLStreamException - If an error occurs reading from the stream, or the stream was
             positioned before an unsupported event.
public Document readDocument(javax.xml.stream.XMLEventReader reader)
                      throws javax.xml.stream.XMLStreamException
Documentfrom the provided stream. The stream
 should be positioned at the start of a document, or before a StartElement event.
reader - The event stream from which to read the Document.
Documentthat was read from the stream.
javax.xml.stream.XMLStreamException - If an error occurs reading events from the stream.
public Element readElement(javax.xml.stream.XMLEventReader eventReader)
                    throws javax.xml.stream.XMLStreamException
StartElementevent. In addition to the
 initial start event, all events up to and including the closing EndElement will be read, and included with the returned element.
eventReader - The event stream from which to read the Element.
javax.xml.stream.XMLStreamException - If an error occured reading events from the stream, or the
             stream was not positioned before a event.
public Attribute readAttribute(javax.xml.stream.XMLEventReader reader)
                        throws javax.xml.stream.XMLStreamException
Attributeevent.
reader - The event stream from which to read the Attribute.
javax.xml.stream.XMLStreamException - If an error occured reading events from the stream, or the
             stream was not positioned before an event.
public Namespace readNamespace(javax.xml.stream.XMLEventReader reader)
                        throws javax.xml.stream.XMLStreamException
Namespaceevent.
reader - The event stream from which to read the Namespace.
javax.xml.stream.XMLStreamException - If an error occured reading events from the stream, or the
             stream was not positioned before a event.
public CharacterData readCharacters(javax.xml.stream.XMLEventReader reader)
                             throws javax.xml.stream.XMLStreamException
Charactersevent.
reader - The event stream from which to read the Text or CDATA.
javax.xml.stream.XMLStreamException - If an error occured reading events from the stream, or the
             stream was not positioned before a event.
public Comment readComment(javax.xml.stream.XMLEventReader reader)
                    throws javax.xml.stream.XMLStreamException
Commentevent.
reader - The event stream from which to read the Comment.
javax.xml.stream.XMLStreamException - If an error occured reading events from the stream, or the
             stream was not positioned before a event.
public Entity readEntityReference(javax.xml.stream.XMLEventReader reader)
                           throws javax.xml.stream.XMLStreamException
EntityReferenceevent.
reader - The event stream from which to read the EntityReference.
Entitythat was read from the stream.
javax.xml.stream.XMLStreamException - If an error occured reading events from the stream, or the
             stream was not positioned before an 
             event.
public ProcessingInstruction readProcessingInstruction(javax.xml.stream.XMLEventReader reader)
                                                throws javax.xml.stream.XMLStreamException
ProcessingInstruction
 event.
reader - The event stream from which to read the ProcessingInstruction.
javax.xml.stream.XMLStreamException - If an error occured reading events from the stream, or the
             stream was not positioned before a ProcessingInstruction event.public Element createElement(javax.xml.stream.events.StartElement startEvent)
startEvent - The StartElement event from which to construct the new DOM4J
            Element.
public Attribute createAttribute(Element elem,
                                 javax.xml.stream.events.Attribute attr)
elem - DOCUMENT ME!attr - The Attribute event from which to construct the new DOM4J
            Attribute.
public Namespace createNamespace(javax.xml.stream.events.Namespace ns)
ns - The Namespace event from which to construct the new DOM4J
            Namespace.
public CharacterData createCharacterData(javax.xml.stream.events.Characters characters)
characters - The Characters event from which to construct the new DOM4J
            Text or CDATA object.
public Comment createComment(javax.xml.stream.events.Comment comment)
comment - The Comment event from which to construct the new DOM4J
            Comment.
public Entity createEntity(javax.xml.stream.events.EntityReference entityRef)
entityRef - The EntityReference event from which to construct the new
            DOM4J Entity.
public ProcessingInstruction createProcessingInstruction(javax.xml.stream.events.ProcessingInstruction pi)
pi - The ProcessingInstruction event from which to construct the
            new DOM4J ProcessingInstruction.
public QName createQName(javax.xml.namespace.QName qname)
qname - The JAXP QName from which to create a DOM4J QName.
| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||