Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.xml.serialize: Javadoc index of package org.apache.xml.serialize.


Package Samples:

org.apache.xml.serialize
org.apache.xml.serializer

Classes:

BaseMarkupSerializer: Base class for a serializer supporting both DOM and SAX pretty serializing of XML/HTML/XHTML documents. Derives classes perform the method-specific serializing, this class provides the common serializing mechanisms. The serializer must be initialized with the proper writer and output format before it can be used by calling setOutputCharStream(java.io.Writer) 55 or setOutputByteStream(java.io.OutputStream) 55 for the writer and setOutputFormat(org.apache.xml.serialize.OutputFormat) 55 for the output format. The serializer can be reused any number of times, but cannot be used concurrently by two ...
Serializer: Interface for a DOM serializer implementation, factory for DOM and SAX serializers, and static methods for serializing DOM documents. To serialize a document using SAX events, create a compatible serializer and pass it around as a org.xml.sax.DocumentHandler . If an I/O error occurs while serializing, it will be thrown by DocumentHandler.endDocument() > DocumentHandler.endDocument() 55 . The SAX serializer may also be used as org.xml.sax.DTDHandler , org.xml.sax.ext.DeclHandler and org.xml.sax.ext.LexicalHandler . To serialize a DOM document or DOM element, create a compatible serializer and call ...
HTMLSerializer: Implements an HTML/XHTML serializer supporting both DOM and SAX pretty serializing. HTML/XHTML mode is determined in the constructor. For usage instructions see Serializer . If an output stream is used, the encoding is taken from the output format (defaults to UTF-8 ). If a writer is used, make sure the writer uses the same encoding (if applies) as specified in the output format. The serializer supports both DOM and SAX. DOM serializing is done by calling BaseMarkupSerializer.serialize(org.w3c.dom.Element) 55 and SAX serializing is done by firing SAX events and using the serializer as a document ...
XMLSerializer: Implements an XML serializer supporting both DOM and SAX pretty serializing. For usage instructions see Serializer . If an output stream is used, the encoding is taken from the output format (defaults to UTF-8 ). If a writer is used, make sure the writer uses the same encoding (if applies) as specified in the output format. The serializer supports both DOM and SAX. SAX serializing is done by firing SAX events and using the serializer as a document handler. DOM serializing is done by calling BaseMarkupSerializer.serialize(Document) 55 or by using DOM Level 3 org.w3c.dom.ls.DOMSerializer and serializing ...
XML11Serializer: Implements an XML serializer supporting both DOM and SAX pretty serializing. For usage instructions see Serializer . If an output stream is used, the encoding is taken from the output format (defaults to UTF-8 ). If a writer is used, make sure the writer uses the same encoding (if applies) as specified in the output format. The serializer supports both DOM and SAX. SAX serializing is done by firing SAX events and using the serializer as a document handler. DOM serializing is done by calling BaseMarkupSerializer.serialize(Document) 55 or by using DOM Level 3 org.w3c.dom.ls.DOMSerializer and serializing ...
NamespaceMappings: This class keeps track of the currently defined namespaces. Conceptually the prefix/uri/depth triplets are pushed on a stack pushed on a stack. The depth indicates the nesting depth of the element for which the mapping was made. For example: When the element is encounted the prefix "p1" associated with uri "def" is pushed on the stack with depth 1. When the first is encountered "p2" and "ghi" are pushed with depth 2. When the is encountered "p3" and "jkl" are pushed with depth 3. When occurs the popNamespaces(3) will pop "p3"/"jkl" off the stack. Of course popNamespaces(2) would pop anything with ...
TextSerializer: Implements a text serializer supporting both DOM and SAX serializing. For usage instructions see Serializer . If an output stream is used, the encoding is taken from the output format (defaults to UTF-8 ). If a writer is used, make sure the writer uses the same encoding (if applies) as specified in the output format. The serializer supports both DOM and SAX. DOM serializing is done by calling BaseMarkupSerializer.serialize(org.w3c.dom.Element) 55 and SAX serializing is done by firing SAX events and using the serializer as a document handler. If an I/O exception occurs while serializing, the serializer ...
ElemContext: This class is a stack frame that consists of information about the element currently being processed by a serializer. Consider this example: A stack frame will be pushed for "A" at depth 1, then another one for "B1" at depth 2. Then "B1" stackframe is popped. When the stack frame for "B2" is pushed, this implementation re-uses the old stack fram object used by "B1" to be efficient at not creating too many of these object. This is by no means a public class, and neither are its fields or methods, they are all helper fields for a serializer. The purpose of this class is to be more consistent with ...
OutputFormat: Specifies an output format to control the serializer. Based on the XSLT specification for output format, plus additional parameters. Used to select the suitable serializer and determine how the document should be formatted on output. The two interesting constructors are: OutputFormat(String,String,boolean) 55 creates a format for the specified method (XML, HTML, Text, etc), encoding and indentation OutputFormat(Document,String,boolean) 55 creates a format compatible with the document type (XML, HTML, Text, etc), encoding and indentation
SerializerTraceWriter: This class wraps the real writer, it only purpose is to send CHARACTERTOSTREAM events to the trace listener. Each method immediately sends the call to the wrapped writer unchanged, but in addition it collects characters to be issued to a trace listener. In this way the trace listener knows what characters have been written to the output Writer. There may still be differences in what the trace events say is going to the output writer and what is really going there. These differences will be due to the fact that this class is UTF-8 encoding before emiting the trace event and the underlying writer ...
HTMLdtd: Utility class for accessing information specific to HTML documents. The HTML DTD is expressed as three utility function groups. Two methods allow for checking whether an element requires an open tag on printing ( isEmptyTag(java.lang.String) 55 ) or on parsing ( isOptionalClosing(java.lang.String) 55 ). Two other methods translate character references from name to value and from value to name. A small entities resource is loaded into memory the first time any of these methods is called for fast and efficient access.
XSLOutputAttributes: This interface has methods associated with the XSLT xsl:output attribues specified in the stylesheet that effect the format of the document output. In an XSLT stylesheet these attributes appear for example as: The xsl:output attributes covered in this interface are: version encoding omit-xml-declarations standalone doctype-public doctype-system cdata-section-elements indent media-type The one attribute not covered in this interface is method as this value is implicitly chosen by the serializer that is created, for example ToXMLStream vs. ToHTMLStream or another one.
ExtendedContentHandler: This interface describes extensions to the SAX ContentHandler interface. It is intended to be used by a serializer. The methods on this interface will implement SAX- like behavior. This allows the gradual collection of information rather than having it all up front. For example the call startElement(namespaceURI,localName,qName,atts) could be replaced with the calls startElement(namespaceURI,localName,qName) addAttributes(atts) If there are no attributes the second call can be dropped. If attributes are to be added one at a time with calls to addAttribute(namespaceURI, localName, qName, type, ...
ObjectFactory: This class is duplicated for each JAXP subpackage so keep it in sync. It is package private and therefore is not exposed as part of the JAXP API. This code is designed to implement the JAXP 1.1 spec pluggability feature and is designed to run on JDK version 1.1 and later, and to compile on JDK 1.2 and onward. The code also runs both as part of an unbundled jar file and when bundled as part of the JDK. This class was moved from the javax.xml.parsers.ObjectFactory class and modified to be used as a general utility for creating objects dynamically.
ToUnknownStream: This class wraps another SerializationHandler. The wrapped object will either handler XML or HTML, which is not known until a little later when the first XML tag is seen. If the first tag is then the wrapped object is an HTML handler, otherwise it is an XML handler. This class effectively caches the first few calls to it then passes them on to the wrapped handler (once it exists). After that subsequent calls a simply passed directly to the wrapped handler. The user of this class doesn't know if the output is ultimatley XML or HTML.
ObjectFactory: This class is duplicated for each JAXP subpackage so keep it in sync. It is package private and therefore is not exposed as part of the JAXP API. This code is designed to implement the JAXP 1.1 spec pluggability feature and is designed to run on JDK version 1.1 and later, and to compile on JDK 1.2 and onward. The code also runs both as part of an unbundled jar file and when bundled as part of the JDK.
DOMSerializerImpl: EXPERIMENTAL: Implemenatation of DOM Level 3 org.w3c.ls.LSSerializer by delegating serialization calls to XMLSerializer . LSSerializer provides an API for serializing (writing) a DOM document out in an XML document. The XML data is written to an output stream. During serialization of XML data, namespace fixup is done when possible as defined in DOM Level 3 Core, Appendix B.
XHTMLSerializer: Implements an XHTML serializer supporting both DOM and SAX pretty serializing. For usage instructions see either Serializer or BaseMarkupSerializer .
Printer: The printer is responsible for sending text to the output stream or writer. This class performs direct writing for efficiency. IndentPrinter supports indentation and line wrapping by extending this class.
DOMSerializer: Interface for a DOM serializer implementation. The DOM serializer is a facet of a serializer. A serializer may or may not support a DOM serializer. Example: Document doc; Serializer ser; OutputStream os; ser.setOutputStream( os ); ser.asDOMSerializer( doc );
Method: This class defines the constants which are the names of the four default output methods. Four default output methods are defined: XML, HTML, XHTML and TEXT. Serializers may support additional output methods. The names of these output methods should be encoded as namespace:local .
CharInfo: This class provides services that tell if a character should have special treatement, such as entity reference substitution or normalization of a newline character. It also provides character to entity reference lookup. DEVELOPERS: See Known Issue in the constructor.
WriterToUTF8Buffered: This class writes unicode characters to a byte stream (java.io.OutputStream) as quickly as possible. It buffers the output in an internal buffer which must be flushed to the OutputStream when done. This flushing is done via the close() flush() or flushBuffer() method.
WriterToASCI: This class writes ASCII to a byte stream as quickly as possible. For the moment it does not do buffering, though I reserve the right to do some buffering down the line if I can prove that it will be faster even if the output stream is buffered.
AttributesImplSerializer: This class extends org.xml.sax.helpers.AttributesImpl which implements org. xml.sax.Attributes. But for optimization this class adds a Hashtable for faster lookup of an index by qName, which is commonly done in the stream serializer.

Home | Contact Us | Privacy Policy | Terms of Service