How do I use the XML Advanced Connector to return cdata?

The data I'm trying to pull in is from a URL and every piece of data is wrapped in cdata tags so Domo isn't recognizing it or returning any data. Is there a way I can pull this in?
Here is a sample of how the data is set up in the XML:
<allData> <unit> <Name> <![CDATA[ Group A ]]> </Name> <number> <![CDATA[ 123456789 ]]> </number> <Code> <![CDATA[ 87654321 ]]> </Code> <Title> <![CDATA[ This is a title ]]> </Title> </unit> <unit> <Name> <![CDATA[ Group B ]]> </Name> <number> <![CDATA[ 223456780 ]]> </number> <Code> <![CDATA[ 98765432 ]]> </Code> <Title> <![CDATA[ This is another title ]]> </Title> </unit> </allData>
Best Answer
-
I figured out way to resolve this so sharing in case someone else has the same issue!
DO YOU REQUIRE ADDITIONAL OPTIONS? select Yes
ENTER XPATH EXPRESSION
The only XPATH expressions that would work for me was to specify the child nodes to import (example: //Name). I couldn't include the path (example: //allData/unit/Name would not work).
In order to get all the columns of data I wanted to pull in from the XML, I had to use this:
//*[self::Name | self::number | self::Code | self::Title ]Save, Run, then my columns and rows populated!
0
Answers
-
Hi Jessy,
Have you tried all three built-in Parsers?You may need to use the X Path functionality that's under the 'additional options' drop-down in the details section of your connector. The link below may be helpful to you as well - I am not able to recreate your problem because we don't have an example dataset.
Hope this helps!
Samantha
Brought to you by Arigato Analytics.
0 -
Hi Samantha, thank you for your response!
I have tried all three parsers and each return the columns (example: "allData_unit_Name", "allData_unit_number", etc) but not the rows of data.
As far as utilizing the xpath field goes, I have tried several combinations of things like the below but none have worked:
- //allData/unit/text()
- //allData/unit/Name/text()
- //*/*/*/text()
- //text()
- etc.
Every example I'm finding online is only for returning one child node with Cdata, not multiple as in my example above. Is that possibly why the solution you linked to isn't working for me?
0 -
I figured out way to resolve this so sharing in case someone else has the same issue!
DO YOU REQUIRE ADDITIONAL OPTIONS? select Yes
ENTER XPATH EXPRESSION
The only XPATH expressions that would work for me was to specify the child nodes to import (example: //Name). I couldn't include the path (example: //allData/unit/Name would not work).
In order to get all the columns of data I wanted to pull in from the XML, I had to use this:
//*[self::Name | self::number | self::Code | self::Title ]Save, Run, then my columns and rows populated!
0
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 656 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 813 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 81 App Studio
- 45 Variables
- 771 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 77 Workflows
- 23 Code Engine
- 36 AI and Machine Learning
- 19 AI Chat
- AI Playground
- AI Projects and Models
- 17 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 142 Manage
- 138 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive