Given the following three pieces of XML:
<?xml version="1.0" encoding="utf-8"?>
<root>
<body>
<customerSearchRequest>
<id>1234</id>
</customerSearchRequest>
</body>
</root>
<?xml version="1.0" encoding="utf-8"?>
<root>
<BODY>
<userSearchRequest>
<id>5678</id>
</userSearchRequest>
</BODY>
</root>
<?xml version="1.0" encoding="utf-8"?>
<root>
<Body>
<orderSearchRequest>
<id>9101</id>
</orderSearchRequest>
</Body>
</root>
I need to extract the name of the first-child of body
(i.e. customerSearchRequest
, userSearchRequest
and orderSearchRequest
), which I am currently doing as follows:
name(//SOAP-ENV:body/*[1])
The problem is, this only works for the first request as body
is case-sensitive. How do I make the path case-insensitive?
Thanks for any pointers.