cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Need to retrieve the attributes of nodes in XML using Xpath

KT_10107318
6-Contributor

Need to retrieve the attributes of nodes in XML using Xpath

Hi everyone, i have xml input. I need to retrieve all the attributes of the specific node .thanks in advance 

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

2 REPLIES 2

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.

Top Tags