I'm trying to pull data from an XML file. I can get all of the data except for the questions. I can seem to find the right XPATH loop or XPATH to get it to lop through the questions and give me the ID and text.
Here's an example of the XML file
<?xml version='1.0' encoding='UTF-8' ?>
<page_data_export url="group://40355">
<data id="15283565400" gmt="-5">
<url>https%3A//invite.frontier.com/foryourhome/ebillpay/billing/paybill</url>
<comments></comments>
<categories>
</categories>
<contextual_data>
<submission_date>06/07/2018 02:29 AM</submission_date>
<referrer>https%3A//www.frontier.com/foryourhome/myaccount/pr/dashboard/details</referrer>
<time_on_page>0.00</time_on_page>
<browser_user_agent>Mozilla/5.0 (iPhone; CPU iPhone OS 11_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1</browser_user_agent>
<browser_type>Mobile Safari iPhone</browser_type>
<browser_version>11.0</browser_version>
<os_type>iOS</os_type>
<os_version>11.3</os_version>
<screen_resolution>414x736</screen_resolution>
<ip_address>xxx.xxx.xxx.xxx</ip_address>
</contextual_data>
<opinion_metrics>
<overall_rating>1</overall_rating>
<content_rating></content_rating>
<design_rating></design_rating>
<usability_rating></usability_rating>
</opinion_metrics>
<email></email>
<custom_vars>
<custom_var1>9e7c745f04e53e4128ff8c240efaa87d</custom_var1>
<custom_var2>
</custom_var2>
</custom_vars>
<custom_questions>
<question id="34">{"tealeaf": [""]}</question>
</custom_questions>
<custom_questions>
<question id="35">75c03c68-e6ae-4f68-b11e-c597c5f99214</question>
</custom_questions>
<custom_questions>
<question id="36">d5b3d479-7c8e-4956-b78c-d11d0f22bc91</question>
</custom_questions>
<custom_questions>
<question id="64">9e7c745f04e53e4128ff8c240efaa87d</question>
</custom_questions>
<custom_questions>
<question id="65">invite</question>
</custom_questions>
<custom_questions>
<question id="66">NESUj67IVILd5gP7NUICFwWFw%3D%3D</question>
</custom_questions>
<custom_questions>
<question id="67">null</question>
</custom_questions>
<custom_questions>
<question id="97">5.9.9</question>
</custom_questions>
<custom_questions>
<question id="98">https://www.frontier.com/foryourhome/ebillpay/billing/paybill</question>
</custom_questions>
<custom_questions>
<question id="4380139">Research/Order new service</question>
</custom_questions>
<custom_questions>
<question id="4380140">No</question>
</custom_questions>
<custom_questions>
<question id="4380141">Complaint</question>
</custom_questions>
</data>
I've tried using /page_data_export/ and /page_data_export/data/
What could I use to give me all the data and all of the questions in one row so I can send it to Table Output?
Keep in mind I can't change the XML it's coming from a webservice.
Should I make changes to the Fields?
Thanks!!
Hi Grant,
You'll need to remove the
<page_data_export url="group://40355">
at the beginning as this creates an invalid XML document. You'll get an error like:
XML document structures must start and end within the same entity.
Please try using "//custom_questions" as the loop XPath and "question" as the field XPath.