org.compass.core.xml.javax.converter
Class StaxNodeXmlContentConverter
java.lang.Object
org.compass.core.xml.javax.converter.NodeXmlContentConverter
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StaxNodeXmlContentConverter
public StaxNodeXmlContentConverter()
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 NodeAliasedXmlObjectxml - 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.