How to read an XML and JSON using the xpath ?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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"
Solved! Go to Solution.
- Labels:
- Parse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
