Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to read an XML and JSON using the xpath ?

pavanshalgar
5 - Atom

Hello,

 

I have a requirement where I have to read XML's using the xpath meta data, is there any way in Alteryx by which I do ?

 

XML Example :

 

<Names>

<Name>

<Student-Name>Anything</Student-Name>

<RollNo>1234</RollNo>

</Name>

</Names>

 

xpath : "Names/Name/Student-Name" should return me "Anything"

 

JSON Example:

 

{
"Name": {
"Student-Name": "Anything",
"RollNo": 1234
}
}

 

xpath : "Name.Student-Name" should return me "Anything"

3 REPLIES 3
Felipe_Ribeir0
16 - Nebula

Hi @pavanshalgar 

 

You can use the XML parse/JSON parse to do that. I personally think that the JSON is a better choice to work with Alteryx.

 

Felipe_Ribeir0_0-1672227496666.png

 

pavanshalgar
5 - Atom

Hi @felipe_Ribeir0 

 

Thanks for the solution but I want to the xpath as an input to get that particular node data or tag data.

 

 

 

Felipe_Ribeir0
16 - Nebula

Hi @pavanshalgar 

 

You wont have exactly the xpath here without using some programming language, but by parsing the JSON and filtering Student-Name you will get what you need, right?

 

Felipe_Ribeir0_0-1672237097061.png

 

Labels