org.apache.xml.serializer

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » xalan » org.apache.xml.serializer 
org.apache.xml.serializer
Xalan Serializer Package.

Processes SAX events into streams.

The {@link org.apache.xml.serializer.SerializerFactory} is used to create a {@link org.apache.xml.serializer.Serializer} from a set of output properties (see {@link javax.xml.transform.OutputKeys}).

{@link org.apache.xml.serializer.ToStream} acts as the main baseclass for the Xalan serializer implementations. {@link org.apache.xml.serializer.ToHTMLStream} derives from this to implement HTML serialization. {@link org.apache.xml.serializer.ToTextStream} implements plain text serialization. {@link org.apache.xml.serializer.ToXMLStream} implements XML serialization.

XML mapping from characters to entity references is defined in XMLEntities.res. HTML entity reference mapping is defined in HTMLEntities.res.

Encoding information is defined in {@link org.apache.xml.serializer.Encodings}.

Java Source File NameTypeComment
AttributesImplSerializer.javaClass This class extends org.xml.sax.helpers.AttributesImpl which implements org. xml.sax.Attributes.
CharInfo.javaClass This class provides services that tell if a character should have special treatement, such as entity reference substitution or normalization of a newline character.
DOMSerializer.javaInterface Interface for a DOM serializer implementation.

The DOMSerializer is a facet of a serializer and is obtained from the asDOMSerializer() method of the Serializer interface.

ElemContext.javaClass This class is a stack frame that consists of information about the element currently being processed by a serializer.
ElemDesc.javaClass This class has a series of flags (bit values) that describe an HTML element This class is public because XSLTC uses it, it is not a public API.
EmptySerializer.javaClass This class is an adapter class.
EncodingInfo.javaClass Holds information about a given encoding, which is the Java name for the encoding, the equivalent ISO name.

An object of this type has two useful methods

 isInEncoding(char ch);
 
which can be called if the character is not the high one in a surrogate pair and:
 isInEncoding(char high, char low);
 
which can be called if the two characters from a high/low surrogate pair.

An EncodingInfo object is a node in a binary search tree.

Encodings.javaClass Provides information about encodings.
ExtendedContentHandler.javaInterface This interface describes extensions to the SAX ContentHandler interface. It is intended to be used by a serializer.
ExtendedLexicalHandler.javaInterface This interface has extensions to the standard SAX LexicalHandler interface.
Method.javaClass This class defines the constants which are the names of the four default output methods.

Three default output methods are defined: XML, HTML, and TEXT.

NamespaceMappings.javaClass This class keeps track of the currently defined namespaces.
ObjectFactory.javaClass 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.

OutputPropertiesFactory.javaClass This class is a factory to generate a set of default properties of key/value pairs that are used to create a serializer through the factory SerializerFactory SerilizerFactory .
OutputPropertyUtils.javaClass This class contains some static methods that act as helpers when parsing a Java Property object. This class is not a public API.
SecuritySupport.javaClass This class is duplicated for each Xalan-Java subpackage so keep it in sync.
SecuritySupport12.javaClass This class is duplicated for each Xalan-Java subpackage so keep it in sync.
SerializationHandler.javaInterface This interface is the one that a serializer implements.
Serializer.javaInterface The Serializer interface is implemented by a serializer to enable users to:
  • get and set streams or writers
  • configure the serializer with key/value properties
  • get an org.xml.sax.ContentHandler or a DOMSerializer to provide input to

Here is an example using the asContentHandler() method:

 java.util.Properties props = 
 OutputPropertiesFactory.getDefaultMethodProperties(Method.TEXT);
 Serializer ser = SerializerFactory.getSerializer(props);
 java.io.PrintStream ostream = System.out; 
 ser.setOutputStream(ostream);
 // Provide the SAX input events
 ContentHandler handler = ser.asContentHandler();
 handler.startDocument();
 char[] chars = { 'a', 'b', 'c' };
 handler.characters(chars, 0, chars.length);
 handler.endDocument();
 ser.reset(); // get ready to use the serializer for another document
 // of the same output method (TEXT).
 

As an alternate to supplying a series of SAX events as input through the ContentHandler interface, the input to serialize may be given as a DOM.

SerializerBase.javaClass This class acts as a base class for the XML "serializers" and the stream serializers.
SerializerConstants.javaInterface
SerializerFactory.javaClass
SerializerTrace.javaInterface This interface defines a set of integer constants that identify trace event types.
SerializerTraceWriter.javaClass This class wraps the real writer, it only purpose is to send CHARACTERTOSTREAM events to the trace listener.
ToHTMLSAXHandler.javaClass This class accepts SAX-like calls, then sends true SAX calls to a wrapped SAX handler.
ToHTMLStream.javaClass This serializer takes a series of SAX or SAX-like events and writes its output to the given stream.
ToSAXHandler.javaClass This class is used to provide a base behavior to be inherited by other To...SAXHandler serializers.
ToStream.javaClass This abstract class is a base class for other stream serializers (xml, html, text ...) that write output to a stream.
ToTextSAXHandler.javaClass This class converts SAX-like event to SAX events for xsl:output method "text".
ToTextStream.javaClass This class is not a public API. It is only public because it is used in other packages.
ToUnknownStream.javaClass This class wraps another SerializationHandler.
ToXMLSAXHandler.javaClass This class receives notification of SAX-like events, and with gathered information over these calls it will invoke the equivalent SAX methods on a handler, the ultimate xsl:output method is known to be "xml".
ToXMLStream.javaClass This class converts SAX or SAX-like calls to a serialized xml document.
TransformStateSetter.javaInterface This interface is meant to be used by a base interface to TransformState, but which as only the setters which have non Xalan specific types in their signature, so that there are no dependancies of the serializer on Xalan.
TreeWalker.javaClass This class does a pre-order walk of the DOM tree, calling a ContentHandler interface as it goes. This class is a copy of the one in org.apache.xml.utils.
Version.javaClass Administrative class to keep track of the version number of the Serializer release.
WriterChain.javaInterface It is unfortunate that java.io.Writer is a class rather than an interface. The serializer has a number of classes that extend java.io.Writer and which send their ouput to a yet another wrapped Writer or OutputStream. The purpose of this interface is to force such classes to over-ride all of the important methods defined on the java.io.Writer class, namely these: write(int val) write(char[] chars) write(char[] chars, int start, int count) write(String chars) write(String chars, int start, int count) flush() close() In this manner nothing will accidentally go directly to the base class rather than to the wrapped Writer or OutputStream.
WriterToASCI.javaClass This class writes ASCII to a byte stream as quickly as possible.
WriterToUTF8Buffered.javaClass This class writes unicode characters to a byte stream (java.io.OutputStream) as quickly as possible.
XSLOutputAttributes.javaInterface 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.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.