Write a comment
Writing comments is only allowed to registered users, registration is free and does not require an email address and can be done quickly here.
Writing comments is only allowed to registered users, registration is free and does not require an email address and can be done quickly here.
ABAP Cloud - How read multiple namespace in XSD
Hi,
How do I read multiple xmlns namespaces prefixed with an xsd file using the abap cl_sxml_string_reader class?
Here's an example:
Thanks in advance.
Hello Marco,
the class reads the XML structure node by node, so you get the namespace of the actual node returned. So you can parse or do with the node what you need to do. All the informations are filled into the fields of the object.
Greetings Björn
Hello Bjorn, i developed this demo report.
If you try to debug, you will be able to notice that you don't able to read the attribute xmlns:myns="http://www.w3.org/2001/XMLSchema".
By your experience there is a way to resolve this.
Thank in advance.
Hello Marco,
from my perspective this a correct behavior. The tag uses the namespace XS, so the namespace for this is http://www.example.com/default. The framework uses the namespace definition, but you can't read it because it's not part of the XML content. If you define a node in the XML that uses the namespace, it will also be listed as a namespace.
In yor example 'targetNamespace' is a normal attribute, so you read it. The namespace of the node is assigned there and it's still XS.
Hope this helps you.
Greetings Björn