2008/12/10 Ramon Buckland <[EMAIL PROTECTED]>:
> I was making the output both a Node and String..
>
> Defaulted to a Node.
>
> so <wellFormedHtml dataObjectType="String.class"/>
>
>
> @XmlRootElement(name = "wellFormedHtml")
> @XmlAccessorType(XmlAccessType.FIELD)
> public class WellFormedHtmlDataFormat extends DataFormatType {
>
> @XmlAttribute(required = false)
> private Class dataObjectType;
>
> public WellFormedHtmlDataFormat(Class<?> dataObjectType) {
>
> super("org.apache.camel.dataformat.tagsoup.WellFormedHtmlDataFormat");
> assert dataObjectType.isAssignableFrom(String.class)
> || dataObjectType.isAssignableFrom(Node.class) :
> "WellFormedHtmlDataFormat only supports returning a String or a
> org.w3c.dom.Node object";
> this.dataObjectType = dataObjectType;
> }
Looks great!
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://fusesource.com/