Hopefully simple XML question (Assembly Editor w/ 1:M rels)
Posted: Fri Nov 16, 2012 6:43 am
I feel like I'm missing some small but crucial detail to work with the Assembly Editor screen in 8.5. Let's say I have an XML file that's in a format of:
<Person>
<Name>Sean</Name>
<Address>
<AddressType>Home</AddressType>
<Street>123 Main Street</Street>
</Address>
<Address>
<AddressType>Work</AddressType>
<Street>678 Industrial Parkway</Street>
</Address>
</Person>
And I want the output to be:
Sean, Home, 123 Main Street
Sean, Work, 678 Industrial Parkway
How do I do that? I know if I use a V-Pivot I can set it to be something like:
Name, HomeAddress, WorkAddress
But I really want them to output as separate rows. The problem I'm having is that Address is 1 to Many and I will never know how many there may be. In the Schema Library, it is defined as a List. It seems like I'm able to output any 1 particular List, but I cannot output across multiple lists. I've read the 5 examples in the IBM Help, but they did not show how to do this.
It seems like a very simple XML concept so I'm sure there's a way to work with it. I've only been in the Assembly Editor for a little over a day. Any help is appreciated.
<Person>
<Name>Sean</Name>
<Address>
<AddressType>Home</AddressType>
<Street>123 Main Street</Street>
</Address>
<Address>
<AddressType>Work</AddressType>
<Street>678 Industrial Parkway</Street>
</Address>
</Person>
And I want the output to be:
Sean, Home, 123 Main Street
Sean, Work, 678 Industrial Parkway
How do I do that? I know if I use a V-Pivot I can set it to be something like:
Name, HomeAddress, WorkAddress
But I really want them to output as separate rows. The problem I'm having is that Address is 1 to Many and I will never know how many there may be. In the Schema Library, it is defined as a List. It seems like I'm able to output any 1 particular List, but I cannot output across multiple lists. I've read the 5 examples in the IBM Help, but they did not show how to do this.
It seems like a very simple XML concept so I'm sure there's a way to work with it. I've only been in the Assembly Editor for a little over a day. Any help is appreciated.