org.compass.core.xml.dom4j.converter
Class SAXReaderXmlContentConverter
java.lang.Object
org.compass.core.xml.dom4j.converter.AbstractXmlWriterXmlContentConverter
org.compass.core.xml.dom4j.converter.SAXReaderXmlContentConverter
- All Implemented Interfaces:
- SupportsXmlContentWrapper, XmlContentConverter
public class SAXReaderXmlContentConverter
- extends AbstractXmlWriterXmlContentConverter
- implements SupportsXmlContentWrapper
A dom4j xml content mapping converter, which uses dom4j SAXReader to
convert the xml string into a Dom4jAliasedXmlObject.
- Author:
- kimchy
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SAXReaderXmlContentConverter
public SAXReaderXmlContentConverter()
supports
public boolean supports(String wrapper)
- This converter does not support a singleton wrapper strategy.
- Specified by:
supports in interface SupportsXmlContentWrapper
fromXml
public AliasedXmlObject fromXml(String alias,
Reader xml)
throws ConversionException
- Uses dom4j
SAXReader to convert the given xml string into a Dom4jAliasedXmlObject.
- Specified by:
fromXml in interface XmlContentConverter
- Parameters:
alias - The alias that will be associated with the AliasedXmlObjectxml - The xml string to convert into an Dom4jAliasedXmlObject
- Returns:
- A
Dom4jAliasedXmlObject parsed from the given xml string and associated with the given alias
- Throws:
ConversionException - In case the xml parsing failed
Copyright (c) 2004-2006 The Compass Project.