[
https://issues.apache.org/activemq/browse/CAMEL-1184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48136#action_48136
]
Jonathan Anstey commented on CAMEL-1184:
----------------------------------------
Hi Ramon,
I'm getting a failure in all tagsoup tests after applying this patch, mind
taking a look?
{code}
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.021 sec <<<
FAILURE!
testUnMarshalToStringOfXml(org.apache.camel.dataformat.tagsoup.TidyMarkupDataFormatAsStringTest)
Time elapsed: 0.003 sec <<< ERROR!
java.lang.IllegalArgumentException: TidyMarkupDataFormat only supports
returning a String or a org.w3c.dom.Node object
at
org.apache.camel.model.dataformat.TidyMarkupDataFormat.<init>(TidyMarkupDataFormat.java:48)
at
org.apache.camel.builder.DataFormatClause.tidyMarkup(DataFormatClause.java:180)
at
org.apache.camel.dataformat.tagsoup.TidyMarkupDataFormatAsStringTest$1.configure(TidyMarkupDataFormatAsStringTest.java:70)
{code}
Also a handy tip is to run CheckStyle first so it picks up any formatting
issues. You can add a profile to do this
{code}
mvn install -Psourcecheck
{code}
> Add a new Dataformat - tidyMarkup - which allows us to unmarshal bad HTML to
> good (XML) Html.
> ---------------------------------------------------------------------------------------------
>
> Key: CAMEL-1184
> URL: https://issues.apache.org/activemq/browse/CAMEL-1184
> Project: Apache Camel
> Issue Type: New Feature
> Reporter: Ramon Buckland
> Assignee: Ramon Buckland
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: patchfile.txt, tidyMarkup-sourcefiles.tgz
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> Using TagSoup, a competent 'bad html' to good well formed (xml) Html, we can
> create a new dataformat such that ..
> from("direct:fromSomeHttpSite")
> .unmarshal().tidyMarkup()
> .setBody().xpath("//table/tr/td[1]")
> .to("direct:foo")
> we get to turn the nasty HTML into goody HTML which can go through XSLT
> components and be xpathed and all the goodness we love.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.