Found the local namespace trick working but not as I expected. It found the inner Tx instead. Back to square on.
Thx for all input so far // Mikael Andersson Wigander > 18 juni 2020 kl. 10:39 skrev Claus Ibsen <claus.ib...@gmail.com>: > > On Thu, Jun 18, 2020 at 10:15 AM Mikael Andersson Wigander > <mikael.grevs...@gmail.com> wrote: >> >> OK, interesting. >> >> I tested the Xpath using a online tester and there it works without using >> any namespace. >> >> Is it possible using XPath without namespaces or are there any xpath >> arguments that can be used? >> > > No really not, java xpath requires the namespace, but there is some > "trick" with local-ns() or some weird syntax I kinda think may be > possible. > >> M >> >>>> On 18 Jun 2020, at 09:53, Alex Dettinger <aldettin...@gmail.com> wrote: >>> >>> Hi Mikael, >>> >>> I've noticed that the incoming xml file is involving 2 xml namespaces >>> while the query looks not. >>> Precising namespaces in the xpath query may help to move further, something >>> like: >>> https://github.com/apache/camel/blob/master/core/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java#L241 >>> >>> hth, >>> Alex >>> >>> On Thu, Jun 18, 2020 at 9:36 AM Mikael Andersson Wigander < >>> mikael.grevs...@gmail.com> wrote: >>> >>>> Hi >>>> >>>> My problem is that I can’t extract some XML using xpath in Camel 3.3.0 >>>> >>>> My incoming XML is complicated where my target tag <Tx></Tx> also has a >>>> tag further down the tree as <Tx></Tx>. >>>> >>>> I have created a demo project on Github for share if someone could help >>>> me. https://github.com/hakuseki/xpath >>>> >>>> I have tested with a more “friendly” XML and both tests manage to retrieve >>>> the XML segment I want. >>>> >>>> This type of XML we get from client is based on a EU/ESMA standard. >>>> >>>> Pls advice >>>> >>>> Thx >>>> >>>> /M >>>> >>>> >> > > > -- > Claus Ibsen > ----------------- > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2