Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Cherichoc-
Creator
Creator

tExtractXMLFields extracting paths correctly

Hi

I am trying to extract data from an API that setup like the below pic. I am only trying to extract the logs data. How would I go about Mapping on tExtractJsonFields. I keep getting Trying to output non-whitespace characters outside main element tree (in prolog or epilog) error

<?xml version="1.0" encoding="UTF-8"?>

<root><status>success</status>

<data>

<story><ID>BL0492PE</ID>

<name>Atlas</name>

<type>assessment</type>

<app><ID>pioneer</ID>

<name>PS</name>

<version>2.9.7</version>

</app>

</story>

<logs><firstname>Jan</firstname>

<lastname>Doe</lastname>

<country>********</country>

<city>********</city>

<status><complete>true</complete>

<updated>2021-10-25T13:04:45+02:00</updated>

</status>

</logs>

<logs><firstname>Peter</firstname>

<lastname>Pan</lastname>

<country>********</country>

<city>********</city>

<status><complete>true</complete>

<updated>2021-10-25T13:04:45+02:00</updated>

</status>

</logs></data><hash>1fda</hash><response_time>0.22277402877807617</response_time></root>

0695b00000PM4GqAAL.png

Labels (6)
1 Solution

Accepted Solutions
Cherichoc-
Creator
Creator
Author

To access logs directly, I used 

"//logs" or "/root/logs

 

To access complete, I used

"./status/complete"

 

I also had to select Body instead of string under textractXMLfield xmlfield

 

 

View solution in original post

1 Reply
Cherichoc-
Creator
Creator
Author

To access logs directly, I used 

"//logs" or "/root/logs

 

To access complete, I used

"./status/complete"

 

I also had to select Body instead of string under textractXMLfield xmlfield