cancel
Showing results for 
Search instead for 
Did you mean: 

stringList to xml

Former Member
0 Kudos

Hi All

I want to convert stringList to xml when i am passing the string i am getting that whole string into one column as <item>

following is the output that i am getting when using the transaction

1)Text_Loader : where i am loading my encoded xml as string

2)StringListToxml : where i am converting string to xml

3)xml saver: looking for the decoded xml

but my output is follows . the output which i want is below the output which i am getting

<?xml version="1.0" encoding="UTF-8"?><Rowsets DateCreated="2007-03-09T12:40:20" EndDate="2007-03-09T12:40:20" StartDate="2007-03-09T12:40:20" Version="11.5.1"><Rowset><Columns><Column Description="Item" MaxRange="0" MinRange="0" Name="Item" SQLDataType="1" SourceColumn="Item"/></Columns><Row><Item><?xml version="1.0" encoding="UTF-8"?><Rowsets DateCreated="2007-01-09T17:42:38" EndDate="2007-01-02T16:11:14" StartDate="2007-01-02T16:11:14" Version="11.5.2">

<Rowset>

<Columns>

<Column Description="" MaxRange="1" MinRange="0" Name="TRANSACTION" SQLDataType="1" SourceColumn="TRANSACTION"/>

<Column Description="" MaxRange="1" MinRange="0" Name="USERID" SQLDataType="1" SourceColumn="USERID"/>

</Columns>

<Row>

<TRANSACTION>A</TRANSACTION>

<USERID>B</USERID>

</Row>

</Rowset>

<Rowset>

<Columns>

<Column Description="" MaxRange="100" MinRange="0" Name="CODE" SQLDataType="1" SourceColumn="CODE"/>

</Columns>

<Row>

<CODE>0012000000000021296</CODE>

</Row>

</Rowset>

</Rowsets></Item></Row></Rowset></Rowsets>

above code automatically got decoded to xml here in forum. it is in encoded form (with all & amp and ;,lt etc)

<b>should get</b>

<?xml version="1.0" encoding="UTF-8"?>

<Rowsets DateCreated="2007-01-09T17:42:38" EndDate="2007-01-02T16:11:14" StartDate="2007-01-02T16:11:14" Version="11.5.2">

<Rowset>

<Columns>

<Column Description="" MaxRange="1" MinRange="0" Name="TRANSACTION" SQLDataType="1" SourceColumn="TRANSACTION"/>

<Column Description="" MaxRange="1" MinRange="0" Name="USERID" SQLDataType="1" SourceColumn="USERID"/>

</Columns>

<Row>

<TRANSACTION>A</TRANSACTION>

<USERID>B</USERID>

</Row>

</Rowset>

<Rowset>

<Columns>

<Column Description="" MaxRange="100" MinRange="0" Name="CODE" SQLDataType="1" SourceColumn="CODE"/>

</Columns>

<Row>

<CODE>0012000000000021296</CODE>

</Row>

</Rowset>

</Rowsets>

Please reply as soon as possible

Regards

Namita

Message was edited by:

Namita Tripathi

Message was edited by:

Namita Tripathi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You are using the wrong action. StringListToXml is designed to parse a comma-separated string into an XML document with one row per "item" in the list. Please refer to the xMII documentation for how to use this action.

Actually, I think you can achieve your goal quite simply by using an XmlLoader instead of a TextLoader.

If your string truly is encoded, do a TextLoader, decode the string, do a TextSaver, then an XmlLoader and it will work properly.

When 11.5 SR3 is released, you can simply use the StringToXml action (not the StringListToXml action). But as far as I know, there is a bug with it in version 11.5 SR2.

- Rick

Former Member
0 Kudos

Thanks Rick it solved my problem

Regards

Namita

Answers (2)

Answers (2)

Former Member
0 Kudos

namita,

This action that is referred to , in which part of xi is it to be populated ?

Regards,

Bala

agentry_src
Active Contributor
0 Kudos

Bala,

This message was answered and closed a year ago. Also I think you are in the wrong forum as this is for xmii not xi.

Regards,

Mike

Former Member
0 Kudos

can you post up the string that you are passing?

i would like to replicate your problem and see how we can get this to work.

Thank You!