Re: Split with xpath loses root element namespaces

2012-11-12 Thread Henrique Viecili
I've analyzed a generic implementation using DOM to copy the namespaces but due to lack of time to check performance impact I ended up with a faster solution specific to my route. As I was using JAXB to unmarshal the XML in a later moment I decided to unmarshal it earlier and split using simple lan

Re: Split with xpath loses root element namespaces

2012-11-11 Thread Claus Ibsen
On Tue, Nov 6, 2012 at 1:04 PM, Henrique Viecili wrote: > Thanks Claus, I will try this solution... > > As a second thought, could this behaviour be added as an enhancement to the > Type Converters or maybe camel-xpath itself? > Did you find a solution for your problem? The type converters wont

Re: Split with xpath loses root element namespaces

2012-11-06 Thread Henrique Viecili
Thanks Claus, I will try this solution... As a second thought, could this behaviour be added as an enhancement to the Type Converters or maybe camel-xpath itself? On Tue, Nov 6, 2012 at 5:17 AM, Claus Ibsen wrote: > Hi > > You are under the mercy of XPath and what XPathExpression can do. > As

Re: Split with xpath loses root element namespaces

2012-11-05 Thread Claus Ibsen
Hi You are under the mercy of XPath and what XPathExpression can do. As it returns a NodeList which has Node elements, you may be able to go from Node -> Document (or whatever the parent type is), and then grab any namespaces. You would then need to use the DOM API from the JDK for that. And do t

Split with xpath loses root element namespaces

2012-11-05 Thread Henrique Viecili
Is there a way to tell the splitter-xpath to copy all parent namespaces to the splitted element? This is what I am trying to do: I am trying to split an XML message with XPath, this message has a schema defining an element containing a sequence of xsi:anySimpleType. Creating such message gives me