Split XML based on field value
Posted: Wed Jan 12, 2022 4:02 pm
My XML looks like this:
Is it possible to split the XML using <orderedSizes> values split by commas? In the example there are 3 sizes ordered, and i would like the xmls being created be named:
<modelNo> + <designID> + first value of orderedSizes array? (M)
<modelNo> + <designID> + second value of orderedSize sarray? (L)
etc
I have never touched XSL transforming, so maybe somebody can share some material or tips?
Code: Select all
<?xml version="1.0" encoding="ISO-8859-13"?>
<orderinfo>
<customerID>6070426</customerID>
<customerPath></customerPath>
<orderID>XO0016184</orderID>
<model>
<modelNo>M800</modelNo>
<modelName>Pants</modelName>
<designID>7778888</designID>
<orderedSizes>M,L,XL</orderedSizes>
<sizeAmount>3</sizeAmount>
<DPauthor>email@email.com</DPauthor>
<PPauthor>email@email.com</PPauthor>
<modelUpdate>2021-01-13T00:00:00.000</modelUpdate>
<order>new order</order>
<confirmPP>no confirm</confirmPP>
</model>
</orderinfo>
<modelNo> + <designID> + first value of orderedSizes array? (M)
<modelNo> + <designID> + second value of orderedSize sarray? (L)
etc
I have never touched XSL transforming, so maybe somebody can share some material or tips?