cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in String List To XML Parser action block in MII 12.2

Former Member
0 Kudos

Hi Experts,

I am facing the following problem in MII 12.2

When I am using the action block "String List To XML Parser" in any transaction,the given input string cannot be parsed properly and an error occurs.An example is given below to illustrate the problem:

The given input string is : PPPI_PHASE_STATUS|PPPI_PROCESS_ORDER|PPPI_EVENT_DATE|PPPI_PHASE|PPPI_EVENT_TIME

Now,instead of parsing the whole string as PPPI_PHASE_STATUS or PPPI_PROCESS_ORDER ,it is getting parsed as individual letters as shown in the following xml.Here,we are using '|' instead of default ',' as taken by Delimiter and it is running fine with ',' but not working with '|'.

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

<Rowsets DateCreated="2011-07-20T06:29:01" EndDate="2011-07-20T06:29:01" StartDate="2011-07-20T06:29:01" Version="12.2.2 Build(224)">

<Rowset>

<Columns>

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

</Columns>

<Row>

<Item></Item>

</Row>

<Row>

<Item>P</Item>

</Row>

<Row>

<Item>P</Item>

</Row>

<Row>

<Item>P</Item>

</Row>

<Row>

<Item>I</Item>

</Row>

<Row>

<Item>_</Item>

</Row>

<Row>

<Item>P</Item>

</Row>

<Row>

<Item>H</Item>

</Row>

<Row>

<Item>A</Item>

</Row>

<Row>

<Item>S</Item>

</Row>

<Row>

<Item>E</Item>

</Row>

<Row>

<Item>_</Item>

</Row>

<Row>

<Item>S</Item>

</Row>

<Row>

<Item>T</Item>

</Row>

<Row>

<Item>A</Item>

</Row>

<Row>

<Item>T</Item>

</Row>

<Row>

<Item>U</Item>

</Row>

<Row>

<Item>S</Item>

</Row>

<Row>

<Item>|</Item>

</Row>

<Row>

<Item>P</Item>

</Row>

<Row>

<Item>P</Item>

</Row>

<Row>

<Item>P</Item>

</Row>

<Row>

<Item>I</Item>

</Row>

<Row>

<Item>_</Item>

</Row>

......................

......................

......................

<Row>

<Item>_</Item>

</Row>

<Row>

<Item>T</Item>

</Row>

<Row>

<Item>I</Item>

</Row>

<Row>

<Item>M</Item>

</Row>

<Row>

<Item>E</Item>

</Row>

</Rowset>

</Rowsets>

Can you please suggest a solution?

The MII version is 12.2 SP02 Patch 3.

Edited by: ShawnaG on Jul 20, 2011 1:13 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

The issue is that the Delimiter property is used as a regular expression that determines how the passed-in string is split. You must escape the | character when setting it as the property here. So

"\\|"

instead of

"|"

would solve the problem.

I see you already used a different character to separate the string but thought to mention this to explain how the action works. There will also be a note released soon to explain the same (note 1612967).

Edited by: Michael Solwecki on Jul 21, 2011 5:31 PM

agentry_src
Active Contributor
0 Kudos

Hi Mike,

Thanks for the clarification (and correction to my escape character). Good insight to have documented in the Forum.

Regards,

Mike

Former Member
0 Kudos

Hi Mike,

Thanks for the information.It was indeed very useful.

Regards,

Shawna

Answers (1)

Answers (1)

agentry_src
Active Contributor
0 Kudos

Hi Shawna,

I believe the character you are using as a delimiter is defined in the expression editor as a string concatenator. I don't have a workbench open and available at the moment, but I think that the expression for your delimiter is being rendered as blank (no delimiter) and so it is parsing each character. Can't say for sure, but you may want to use an escape character (I think it would be \|) and try it again or if you have control of the delimiter, use something different.

Regards,

Mike

Former Member
0 Kudos

Hi Mike,

Thanks for your suggestion.I tried with blank,it works but it doesn't work for '/|'.But space is not desirable in this scenario as we can always use space in comments also.So we tried with '~' and it worked.

Regards,

Shawna