Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: cristi.boizasHi,
I am using a XML Data Node for reading an XML file and I must transpose the content into a csv file . Example:
<ProductList>
<id>1</id>
<brand>100</brand>
<name>Mobile</name>
<subproductList occurence="Optional">
<id>1</id>
<subname>Internet</subname>
<subproductList occurence="Mandatory">
<id>2</id>
<subname>SMS</subname>
<ProducList>
I am trying to obtain something like:
Product_ID | Product_Brand | Product_Name | SubProduct_Occurence | SubProduct_Id | SubProduct_Name
1|100|Mobile|1|Optional|Internet
1|100|Mobile|2|Mandatory|SMS
The columns are received from a configuration list in a DB table Like : Name - Product_Id, Type: NUMBER, Length: 10 , Position: 1
The problem I am currently having is that the XML outputs the data dinamically and does not arrange the columns in the way they appear in the file so, I can get the Product_Id on either position 1 , or 4 . The checks I perform use a loop and use the column position to identify the appropriate column, so is there a way to make the XML Data node output the data in the order it finds the tags in the input XML file ?