Hi everyone, i have xml input. I need to retrieve all the attributes of the specific node .thanks in advance
Solved! Go to Solution.
Whenever I need to parse XML, I use the built-in E4X framework to access what I need.
For example, if I need to retrieve the name attribute, I use this syntax:
result = result_XML.*::["XMI.content"].UML::Model[0].@name
There are various other accessors,all described here: https://svn.wso2.org/repos/wso2/tags/carbon/0.1alpha/mashup/java/xdocs/e4xquickstart.html
I always use this approach because I do not like to depend on other extensions, especially when there is a built-in capability in the platform to do that.
The E4X framework is not exactly something extremely easy to understand, but also not a huge task - hence I suggest trying this.
Hello @KT_10107318
Pls check the attached article and let me know if it works for you:
https://www.ptc.com/en/support/article/cs308188
Regards
Bhawna
Whenever I need to parse XML, I use the built-in E4X framework to access what I need.
For example, if I need to retrieve the name attribute, I use this syntax:
result = result_XML.*::["XMI.content"].UML::Model[0].@name
There are various other accessors,all described here: https://svn.wso2.org/repos/wso2/tags/carbon/0.1alpha/mashup/java/xdocs/e4xquickstart.html
I always use this approach because I do not like to depend on other extensions, especially when there is a built-in capability in the platform to do that.
The E4X framework is not exactly something extremely easy to understand, but also not a huge task - hence I suggest trying this.