I have a challenge using the Read XML action in workflow.
The action works very well if I have a single node with multiple attributes but... When the xml contains several nodes, all with the same title / attributes the action gets very complicated.
An example of the xml file is...
<?xml version="1.0" encoding="utf-16"?>
<Persons>
<Data version="1.0"
last_name="JONES"
first_name="MATTHEW"
middle_name="DAVID"
</Data>
<Data version="1.0"
last_name="SMITH"
first_name="TERRY"
middle_name="ALLAN"
</Data>
<Data version="1.0"
last_name="MILLER"
first_name="DAVID"
middle_name="JACOB"
</Data>
</Persons>
In the action "Read XML" I can use the xpath //@last_name|//@first_name|//@middle_name
The options are "first match only" which works but I need to continue through the data and create records for each set.
another option is "All matches (combined with no spaces)" and finally a third option of "All matches (as a multi value token)"
the option of "All matches (as a multi value token)" seemed to be the method of choice for this action as all the data meeting the criteria is returned to the token.
I then thought I could use the "For each value" action against the token but the data is not stored in the token as a collection, rather, each piece of data is stored individually in the multi value token.
Example of the token.
Token1
Field1 = JONES
Field2 = MATTHEW
Field3 = DAVID
Field4 = SMITH
Field5 = TERRY
Field6 = ALLAN
etc....
So my challenge is to use the data collected from the Read XML action to create other tokens for use in creating documents and template data but I need assistance with a setup that can process through each "Data" node as a collection.