Hi,
I have a requirement to query an xml which of the below format
<root xmlns:xsi=<> xmlns:xsd=<> xmlns:
value1
value2
the requirement is to fetch the value of key1. The way I followed is, I got the rootLocalName of xml and prepared an XPath to query the node like this
/%rootLocalName%/parent1/key1
but, the query gave me null results.
Can some one help me on this?
I didn’t have DocType for this. The original requirement was with prefix and now, user come up with additional requirement that the service should serve the xmls without rootPrefix.
I have seen many posts saying that it is difficult to query a node with defaultNamespace. But, I have to get it done without disturbing the input xml root tag.
As there was never a sample xml structure with namespaceprefix present inside the tags we might have been looking in the wrong direction sometimes.
As there different types of presentations of xml messages regarding the presence or absence of namespace prefixes this can be confusing when not knowing all occuring variants.
All elements have prefixes
No element does have a prefix
Only the root element does have a prefix
This depends on how xsd are composed/cascaded with namespaces defined and if they define elementFormQualified as true or false.
In my project I have observed all 3 types of messages for different interfaces causing more or less trouble when importing them into the IS as well as constructing test and reference data for testing them on either 7.1 or 9.5.