BizTalk Utilities CV ,   Jobs ,   Code library  
 
Home Page
XALAN
org.apache.xml.serializer.Encodings Class
org.apache.xml.serializer.DOMSerializer Interface
org.apache.xml.dtm.DTMManager Class
org.apache.xalan.xslt.Process Class
org.apache.xalan.xslt.EnvironmentCheck Class
org.apache.xalan.xsltc.trax.TransformerFactoryImpl Class
org.apache.xalan.xsltc.trax.TemplatesImpl Class
org.apache.xalan.xsltc.trax.SmartTransformerFactoryImpl Class
org.apache.xalan.xsltc.trax.DOM2SAX Class
org.apache.xalan.transformer.XalanProperties Class
org.apache.xalan.transformer.TrAXFilter Class
org.apache.xalan.transformer.TransformerIdentityImpl Class
org.apache.xalan.processor.TransformerFactoryImpl Class
org.apache.xalan.lib.sql.XConnection Class
javax.xml.transform.sax.TemplatesHandler Class
XALAN Getting Started with XSLTC
The Usage of XALAN
Overview of XALAN - Java
<< WCF, WS, SOAP
XHTML >>

By :Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :03/24/2008
Times viewed :662

 

Xalan: The org.apache.xml.serializer.Serializer Interface

Sub Interfaces: org.apache.xml.serializer.SerializationHandler

Members

Signature

Public methods

ContentHandler

asContentHandler()

DOMSerializer

asDOMSerializer()

java.util.Properties

getOutputFormat()

java.io.OutputStream

getOutputStream()

java.io.Writer

getWriter()

boolean

reset()

void

setOutputFormat(java.util.Properties format)

void

setOutputStream(java.io.OutputStream output)

void

setWriter(java.io.Writer writer)

Overview

The Serializer interface is implemented by Serializers to publish methods to get and set streams and writers, to set the output properties, and get the Serializer as a ContentHandler or DOMSerializer.

Method Overviews

This method has important methods to return a ContentHandler interface into this serializer, return a DOMSerializer interface into this serializer etc. This can be reused with different configuration by calling reset() method.

Example of creating a Serializer object:

Generally org.apache.xml.serializer.SerializerFactory is used to create an instance of Serializer object.

java.util.Properties prop = OutputPropertiesFactory.getDefaultMethodProperties("xml");

            Serializer ser = SerializerFactory.getSerializer(prop);

In the above example, I have used created a Properties object using  OutputPropertiesFactory.getDefaultMethodProperties("xml"). The I have creates an instance of Serializer instance.

Example of asDOMSerializer():

This method returns a org.apache.xml.serializer.DOMSerializer interface into this serializer. If the serializer does not support the DOMSerializer interface, it should return null.

            DOMSerializer domSerializer = ser.asDOMSerializer();

A DOM serializer is a facet of a serializer. A serializer may or may not support a DOM serializer. A DOMserializer is used to Serializes the DOM node. So as I have mentioned, this class is useful to serialize XML related objects.

Example of asContentHandler():

This method returns a ContentHandler interface into this serializer. If the serializer does not support the ContentHandler interface, it should return null. Before using this menthod ensure that your serializer os SAX2 compliant otherwise, it will return null.

ContentHandler cont = ser.asContentHandler();


Rate this article on a scale of 1 to 10

Your vote :  


 

Recent Jobs

A great opportunity to Digital Vide
here is a greate opportunity as a S
A great opportunity as a Network En
A Greate Opportunituy as a SQL Deve
An immediate job opportunity as a B

View all Jobs (Add yours)
View all CV (Add yours)



Information Online

swimming pool builder
chicago web site design
free conference call
Domain Names
masks
Donna karan sunglasses
answering service


    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP