Select to view content in your preferred language

XML Reader Data Issues in Data Interop Workbench

629
1
03-19-2023 12:49 PM
ChuckColeman
New Contributor

I'm having difficult reading in XML files and being able to cherry pick the data I want, without multiple lines of output with blank fields in the Data Interop Workbench. Here is an example:

Given the following XML file:

<document>
    <pages>
        <page title="one" id="001">
            <objects>
                <object name="thing1">
                    <property type="string">Thing 1</property>
                </object>
            </objects>
        </page>
        <page title="two" id="002">
            <objects>
                <object name="thing2">
                    <property type="string">Thing 2</property>
                </object>
            </objects>
        </page>
    </pages>
</document>
 
I want to gather the page title, object name, and property text.
It should output 2 records like the following:
"one", "thing1", "Thing 1"
"two", "thing2", "Thing 2"
 
As I stated previously, no matter which elements I select in the Feature Set,
I get several lines with blank fields.
 
I cannot offer any screenshots as Data Interop Workbench is running on a secured system
with no internet connection.
 
Any help would be greatly appreciated.
 
0 Kudos
1 Reply
RenatoSalvaleon3
Esri Contributor

From what I read in your sample, <pages> is an array of page that has a title and a single property.

Your feature path must be set like below. Checking the Property checkbox is probably not needed.  Your list exploder will do the rest of the pivoting. 

RenatoSalvaleon3_0-1679310256795.png

The above results to the following;

RenatoSalvaleon3_1-1679310611808.png

 

If you are reading the XML from a path, you would not be able to see any option in the Select element to match dialog, so you have to type below in the Elements to Match text box: 

document/pages

Hopefully, this helps, as your sample is very simple and XMLs can be quite complex until you get to know its pattern. Let me know if you have additional questions.

0 Kudos