org.compass.core.xml.javax.converter
Class StaxNodeXmlContentConverter

java.lang.Object
  extended by org.compass.core.xml.javax.converter.NodeXmlContentConverter
      extended by org.compass.core.xml.javax.converter.StaxNodeXmlContentConverter
All Implemented Interfaces:
CompassConfigurable, SupportsXmlContentWrapper, XmlContentConverter

public class StaxNodeXmlContentConverter
extends NodeXmlContentConverter

Uses JSE to convert an xml content to and from NodeAliasedXmlObject.

Author:
kimchy

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.compass.core.converter.xsem.SupportsXmlContentWrapper
SupportsXmlContentWrapper.NotSupportedXmlContentWrapperException
 
Field Summary
 
Fields inherited from class org.compass.core.xml.javax.converter.NodeXmlContentConverter
documentBuilder, transformer
 
Constructor Summary
StaxNodeXmlContentConverter()
           
 
Method Summary
 void configure(CompassSettings settings)
          Configure using the given settings.
 AliasedXmlObject fromXml(String alias, Reader xml)
          Uses the already created DocumentBuilder and Stax2DomBuilder and parse the given xml into a NodeAliasedXmlObject.
 
Methods inherited from class org.compass.core.xml.javax.converter.NodeXmlContentConverter
doCreateDocumentBuilder, doCreateTransformer, supports, toXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaxNodeXmlContentConverter

public StaxNodeXmlContentConverter()
Method Detail

configure

public void configure(CompassSettings settings)
               throws CompassException
Description copied from interface: CompassConfigurable
Configure using the given settings.

Specified by:
configure in interface CompassConfigurable
Overrides:
configure in class NodeXmlContentConverter
Parameters:
settings - The settings for the configured object
Throws:
CompassException

fromXml

public AliasedXmlObject fromXml(String alias,
                                Reader xml)
                         throws ConversionException
Uses the already created DocumentBuilder and Stax2DomBuilder and parse the given xml into a NodeAliasedXmlObject.

Specified by:
fromXml in interface XmlContentConverter
Overrides:
fromXml in class NodeXmlContentConverter
Parameters:
alias - The alias that will be associated with the NodeAliasedXmlObject
xml - The xml string to parse into NodeAliasedXmlObject
Returns:
A NodeAliasedXmlObject parsed from the given xml string and associated with the given alias
Throws:
ConversionException - In case the xml parsing failed


Copyright (c) 2004-2008 The Compass Project.