Get path of xml elements (tag) and their values and attributes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2024 01:45 AM
Hello there,
I have a requirement to insert in the database the path, attributes and values of each element(tag) of an xml file but I don't see how to do it with snaplogic. I did a python script using lxml library but I don't understand how to use this script in SnapLogic. How can I install lxml in snaplogic and use it in Script snap?
Thank you for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2024 07:54 AM
Hello,
Have you tried to parse the XML file ?
I've used this to read in and validate XML files against a XSD before transforming / posting the data etc.
Hope it helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2024 12:34 AM
Hello, thank you for your response.
I don't see how parse the xml file will help me to get the paths, attributes and values of tags. The idea is also that we want to be more generic, we don't know the schema of the xml files. It is for that we want to use an external tool such as lxml which we saw it can do that in python.