Hi I think XPathExpressionException is only thrown if you use <xpath> and not <tokenize>
The latter does not support validating xml against a schema and whatnot. Its for a streaming and token approach using regular exp pattern matching. It has some limitations. So use <xpath> if you need that validation. Or try with http://camel.apache.org/stax.html On Fri, Sep 5, 2014 at 7:03 PM, balavino <[email protected]> wrote: > I use split with tokenize to split a xml file based on a tag also a xpath > expression to get a particular attributes value. > When i give a malformed xml like a missing tag closure as : > <parent><child></child<parent> it raises a XPathExpressionException, > while i have a xml as : <parent><child></child></child><parent> it doesn't > complain it as malformed. > > / <split strategyRef="splitXmlAggregator" > stopOnException="true"> > <tokenize token="Record" xml="true" /> > <setHeader headerName="Id"> > <xpath > resultType="java.lang.String">/parent/child@value</xpath> > </setHeader> > </split>/ > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-split-tokenizer-does-not-identify-malformed-xml-tp5756111.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
