and flattening the elements:
not the output is fine, im getting what i require out:
I have my SystemCodeNumber, Easting and Northing out. I would like to add them as i one to many so i can get my output as required. At the moment im testing to see if the attribute exists and storing it in a VariableSetter and Retrieving it before writing.
What im trying to figure out (without having to go down the python route as i can do it in python is if we have a simpler way to do this?
Thanks
Solved
XML accessing attributes at parent level
Hi All
XML Format as follows:
<?xml version="1.0" encoding="UTF-8"?>
<Flows><SCN>
<SystemCodeNumber>N11111J</SystemCodeNumber>
<FlowType>Scoot</FlowType>
<ShortDescription/>
<Northing>0.00</Northing>
<Easting>0.00</Easting>
<Flows>
<Flow Date="2015-05-03 05:08:35">1.0</Flow>
<Flow Date="2015-05-03 05:13:35">4.0</Flow>
etc.
I am accessing an XML file as a single merged feature type as i would like an output as follows:
SystemCodeNumber,Northing,Easting,Speed,Flow,Date
N11111J,0.00,0.00,,1.0,2015-05-03 05:08:35
N11111J,0.00,0.00,,4.0,2015-05-03 05:13:35
N11111J,0.00,0.00,,1.0,2015-05-03 05:18:35
N11111J,0.00,0.00,,0.0,2015-05-03 05:23:35
as so on.
I am getting the elements i want:
Best answer by takashi
Hi,
try setting "SCN" to the Elements to Match parameter. Values of the attribute "Flows/Flow/@Date" will be stored in a list attribute called "Flows.Flow{}.Date". You can then explode features on "Flows.Flow{}" with the ListExploder.
However, I'm not sure how the "Speed" should be treated, since "Speed" elements are not shown in your sample XML doc.
Takashi
View originalThis post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.