You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

I've got a tReceive in a job I'm using to update a database from MDM. The data model has a one to many relationship within it, the update looks like the below. How do I extract the VendorBrandName values ([3] and [20])? I'd like to get a flow out of this with two rows that look like this:
id Brand VendorBrandName
3 TheBrandName 3
3 TheBrandName 20
Here is the update XML:
<exchange xmlns:mdm="java:com.amalto.core.plugin.base.xslt.MdmExtension">
<report>
<Update>
<UserName>administrator</UserName>
<Source>genericUI</Source>
<TimeInMillis>1338934965937</TimeInMillis>
<RevisionID>null</RevisionID>
<DataCluster>My_Container</DataCluster>
<DataModel>Brand</DataModel>
<Concept>Brand</Concept>
<Key>3</Key>
<Item>
<path>VendorBrandName[2]</path>
<oldValue/>
<newValue>[20]</newValue>
</Item>
<OperationType>UPDATE</OperationType>
</Update>
</report>
<item><Brand><id>3</id><BrandName>TheBrandName</BrandName><VendorBrandName>[3]</VendorBrandName><VendorBrandName>[20]</VendorBrandName></Brand></item>
</exchange>
Thanks in advance for any hints!
Offline
Hi,
You will need to put the Loop Element on the VendorBrandName, as it's the one that has the One to Many relationship.
/exchange/item/VendorBrandName
Then to extract all your field just use Xpath.
ID ---> ../id
BrandName ---> ../BrandName
VendorName ----> .
Offline

Thanks, Vincent that works perfectly!
Offline
Pages: 1