javax.xml.bind
Interface Marshaller


public interface Marshaller

The Marshaller class is responsible for governing the process of serializing Java content trees back into XML data.

Since:
18-Oct-2004
Author:
Thomas.Diesler@jboss.org

Field Summary
static String JAXB_ENCODING
          The name of the property used to specify the output encoding in the marshalled XML data.
static String JAXB_FORMATTED_OUTPUT
          The name of the property used to specify whether or not the marshalled XML data is formatted with linefeeds and indentation.
static String JAXB_NO_NAMESPACE_SCHEMA_LOCATION
          The name of the property used to specify the the xsi:noNamespaceSchemaLocation attribute value to place in the marshalled XML output.
static String JAXB_SCHEMA_LOCATION
          The name of the property used to specify the xsi:schemaLocation attribute value to place in the marshalled XML output.
 
Method Summary
 ValidationEventHandler getEventHandler()
          Return the current event handler or the default event handler if one hasn't been set.
 Node getNode(Object contentTree)
          Get a DOM tree view of the content tree(Optional).
 Object getProperty(String name)
          Get the particular property in the underlying implementation of Marshaller.
 void marshal(Object obj, ContentHandler handler)
          Marshal the content tree rooted at obj into SAX2 events.
 void marshal(Object obj, Node node)
          Marshal the content tree rooted at obj into a DOM tree.
 void marshal(Object obj, OutputStream os)
          Marshal the content tree rooted at obj into an output stream.
 void marshal(Object obj, Result result)
          Marshal the content tree rooted at obj into the specified javax.xml.transform.Result.
 void marshal(Object obj, Writer writer)
          Marshal the content tree rooted at obj into a Writer.
 void setEventHandler(ValidationEventHandler handler)
          Allow an application to register a validation event handler.
 void setProperty(String name, Object value)
          Set the particular property in the underlying implementation of Marshaller.
 

Field Detail

JAXB_ENCODING

static final String JAXB_ENCODING
The name of the property used to specify the output encoding in the marshalled XML data.

See Also:
Constant Field Values

JAXB_FORMATTED_OUTPUT

static final String JAXB_FORMATTED_OUTPUT
The name of the property used to specify whether or not the marshalled XML data is formatted with linefeeds and indentation.

See Also:
Constant Field Values

JAXB_NO_NAMESPACE_SCHEMA_LOCATION

static final String JAXB_NO_NAMESPACE_SCHEMA_LOCATION
The name of the property used to specify the the xsi:noNamespaceSchemaLocation attribute value to place in the marshalled XML output.

See Also:
Constant Field Values

JAXB_SCHEMA_LOCATION

static final String JAXB_SCHEMA_LOCATION
The name of the property used to specify the xsi:schemaLocation attribute value to place in the marshalled XML output.

See Also:
Constant Field Values
Method Detail

getEventHandler

ValidationEventHandler getEventHandler()
                                       throws JAXBException
Return the current event handler or the default event handler if one hasn't been set.

Throws:
JAXBException

getNode

Node getNode(Object contentTree)
             throws JAXBException
Get a DOM tree view of the content tree(Optional).

Throws:
JAXBException

getProperty

Object getProperty(String name)
                   throws PropertyException
Get the particular property in the underlying implementation of Marshaller.

Throws:
PropertyException

marshal

void marshal(Object obj,
             ContentHandler handler)
             throws JAXBException
Marshal the content tree rooted at obj into SAX2 events.

Throws:
JAXBException

marshal

void marshal(Object obj,
             Node node)
             throws JAXBException
Marshal the content tree rooted at obj into a DOM tree.

Throws:
JAXBException

marshal

void marshal(Object obj,
             OutputStream os)
             throws JAXBException
Marshal the content tree rooted at obj into an output stream.

Throws:
JAXBException

marshal

void marshal(Object obj,
             Result result)
             throws JAXBException
Marshal the content tree rooted at obj into the specified javax.xml.transform.Result.

Throws:
JAXBException

marshal

void marshal(Object obj,
             Writer writer)
             throws JAXBException
Marshal the content tree rooted at obj into a Writer.

Throws:
JAXBException

setEventHandler

void setEventHandler(ValidationEventHandler handler)
                     throws JAXBException
Allow an application to register a validation event handler.

Throws:
JAXBException

setProperty

void setProperty(String name,
                 Object value)
                 throws PropertyException
Set the particular property in the underlying implementation of Marshaller.

Throws:
PropertyException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.