| Home >> All >> org >> dom4j >> [ io Javadoc ] |
org.dom4j.io: Javadoc index of package org.dom4j.io.
Package Samples:
org.dom4j.io
Classes:
HTMLWriter: HTMLWriter takes a DOM4J tree and formats it to a stream as HTML. This formatter is similar to XMLWriter but it outputs the text of CDATA and Entity sections rather than the serialised format as in XML, it has an XHTML mode, it retains whitespace in certain elements such as <PRE>, and it supports certain elements which have no corresponding close tag such as for <BR> and <P>. The OutputFormat passed in to the constructor is checked for isXHTML() and isExpandEmptyElements(). See OutputFormat for details. Here are the rules for this class based on an OutputFormat, "format", passed ...
SAXReader: SAXReader creates a DOM4J tree from SAX parsing events. The actual SAX parser that is used by this class is configurable so you can use your favourite SAX parser if you wish. DOM4J comes configured with its own SAX parser so you do not need to worry about configuring the SAX parser. To explicitly configure the SAX parser that is used via Java code you can use a constructor or use the setXMLReader(XMLReader) 55 or setXMLReaderClassName(String) 55 methods. If the parser is not specified explicitly then the standard SAX policy of using the org.xml.sax.driver system property is used to determine the ...
XMLWriter: XMLWriter takes a DOM4J tree and formats it to a stream as XML. It can also take SAX events too so can be used by SAX clients as this object implements the org.xml.sax.ContentHandler and org.xml.sax.ext.LexicalHandler interfaces. as well. This formatter performs typical document formatting. The XML declaration and processing instructions are always on their own lines. An OutputFormat object can be used to define how whitespace is handled when printing and allows various configuration options, such as to allow suppression of the XML declaration, the encoding declaration or whether empty documents ...
SAXEventRecorder: Records SAX events such that they may be "replayed" at a later time. Provides an alternative serialization approach when externalizing a DOM4J document. Rather than serializing a document as text and re-parsing, the sax events may be serialized instead. Example usage: SAXEventRecorder recorder = new SAXEventRecorder(); SAXWriter saxWriter = new SAXWriter(recorder, recorder); saxWriter.write(document); out.writeObject(recorder); ... SAXEventRecorder recorder = (SAXEventRecorder)in.readObject(); SAXContentHandler saxContentHandler = new SAXContentHandler(); recorder.replay(saxContentHandler); Document ...
SAXModifier: The SAXModifier reads, modifies and writes XML documents using SAX. Registered ElementModifier objects can provide modifications to (part of) the xml tree, while the document is still being processed. This makes it possible to change large xml documents without having them in memory. The modified document is written when the XMLWriter is specified.
SAXModifyElementHandler: This org.dom4j.ElementHandler is used to trigger ElementModifier objects in order to modify (parts of) the Document on the fly. When an element is completely parsed, a copy is handed to the associated (if any) ElementModifier that on his turn returns the modified element that has to come in the tree.
DispatchHandler: DispatchHandler implements the ElementHandler interface and provides a means to register multiple ElementHandler instances to be used by an event based processor. This is a special ElementHandler in that it's onStart and onEnd implementation methods are called for every element encountered during the parse. It then delegates to other ElementHandler instances registered with it to process the elements encountered.
SAXModifyReader: The SAXModifier parses, updates and writes an XML document. The input that is parsed is directly written to the specified output, unless the current xml element has an associated ElementHandler. The org.dom4j.ElementHandler objects make it possible to update the document on the fly, without having read tje complete document.
ElementStack: ElementStack is used internally inside the SAXContentHandler to maintain a stack of org.dom4j.Element instances. It opens an integration possibility allowing derivations to prune the tree when a node is complete.
PruningElementStack: PruningElementStack is a stack of org.dom4j.Element instances which will prune the tree when a path expression is reached. This is useful for parsing very large documents where children of the root element can be processed individually rather than keeping them all in memory at the same time.
ElementModifier: ElementModifier defines a modifier of org.dom4j.Element objects. It can be used in the event based SAXModifier , in order to modify elements on the fly, rather than waiting until the complete document is parsed.
SAXValidator: SAXValidator validates an XML document by writing the document to a text buffer and parsing it with a validating SAX parser. This could be implemented much more efficiently by validating against the dom4j object model directly but at least allows the reuse of existing SAX based validating parsers.
XPPReader: XPPReader is a Reader of DOM4J documents that uses the fast XML Pull Parser 2.x . It does not currently support comments, CDATA or ProcessingInstructions or validation but it is very fast for use in SOAP style environments.
PruningDispatchHandler: This extension on the DispatchHandler prunes the current org.dom4j.Element when there are no ElementHandler objects active the element.
DTDTest: Tests the DocType functionality. Incorporated additional test cases for optional processing of the internal and external DTD subsets. The "external" and "mixed" tests both fail due to a reported bug. See http://tinyurl.com/4dzyq
STAXEventReader: Reads a DOM4J org.dom4j.Document , as well as other org.dom4j.Node s, from a StAX javax.xml.stream.XMLEventReader .
XMLResult: XMLResult implements a JAXP javax.xml.transform.sax.SAXResult for an output stream with support for pretty printing and control over how the XML is formatted.
DocumentResult: DocumentResult implements a JAXP javax.xml.transform.sax.SAXResult for a org.dom4j.Document .
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.
SAXModifyException: Exception internally thrown by the SAX Modification classes. This is a RuntimeException since the org.dom4j.ElementHandler methods do not throw Exceptions.
DocumentInputSource: DocumentInputSource implements a SAX org.xml.sax.InputSource for a org.dom4j.Document .
JAXPHelper: JAXPHelper contains some helper methods for working with JAXP. These methods are kept in a seperate class to avoid class loading issues, such that dom4j can work without JAXP on the CLASSPATH
STAXEventWriter: Writes DOM4J org.dom4j.Node s to a StAX event stream. In addition the createXXX methods are provided to directly create STAX events from DOM4J nodes.
| Home | Contact Us | Privacy Policy | Terms of Service |