span8
span4
span8
span4
I am searching for a method to take an XML based array and insert each array value into a new record.Currently my workspace parses non-array XML tags\variable and inserts them into one single SQL record,but now I need a one to many relationship.The number of array items is indefinite.
The use case is that we get field inspections in the form of an XML document that gets inserted into our SQL database (various tables - all 1:1).We now want to start registering file\photo attachments to a reference table,however the photos are stored in an array (not a simple 1:1 insert).
Has anyone accomplished this?Idea would be much appreciated.Thanks!
Hi@bhornung,concrete solution depends on the schema of the XML document,but I think the XMLFragmenter or the XMLFlattener might help you in many cases.
For example,if the source XML looks like this,
value01 value02 value11 value12
the XMLFragmenter (Elements to Match: record,Flatten Options: Enable Flattening) outputs two features containing these attributes.
The 1st Feature has:Attribute(encoded: utf-16): `tag1' has value `value01'Attribute(encoded: utf-16): `tag2' has value `value02'The 2nd Feature has:Attribute(encoded: utf-16): `tag1' has value `value11'Attribute(encoded: utf-16): `tag2' has value `value12'
If you would need more specific answers,please post a small XML example and specifically explain about what result you need to get from the XML