0

I am having an XML like the below:

<RootNode xmlns="ns1">
    <Node xmlns="ns2">
        <id>TestID</id>
    </Node>
</RootNode>

I want to find the namespace of the element with name Node which is ns2. Can anyone please guide me how to do this using XPath? I am using Spring Boot and Apache Camel in my project.

Anirban
  • 925
  • 4
  • 24
  • 54
  • No It is slightly different. In the example given, the root element and subsequent elements does not have a namespace, but here I will have to find the namespace of an element – Anirban Jul 06 '22 at 14:32
  • @Anirban how is that different? Isn't the namespace just an attribute? – f1sh Jul 06 '22 at 14:36

0 Answers0