1

Topic: Obtaining namespace in xpath apache camel

xml

<? xml version = "1.0" encoding = "utf-8"?>
<tns:FRequest
 = "111"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xmlns:tns = "urn://x-artifacts">
</tns:FRequest>

How to receive "urn://x-artifacts" using xpath in Apache Camel?

<xpath resultType = "java.lang. String" >//tns:FLRESPLSVRequest/@</xpath>
<xpath resultType = "java.lang. String">//tns:FLRESPLSVRequest / * [1] </xpath>

Remarkably deduce "111"
And here with it

<xpath resultType = "java.lang. String" >//tns:FLRESPLSVRequest/@xmlns:tns</xpath>
<xpath resultType = "java.lang. String">//tns:FLRESPLSVRequest / * [3] </xpath>

It is impossible

2

Re: Obtaining namespace in xpath apache camel

sanringo wrote:

How to receive "urn://x-artifacts"

What for? That you with it were going to do

sanringo wrote:

it is impossible

the Namespace declaration is not attribute