Skip to Content
0
Former Member
Aug 15, 2005 at 06:12 PM

Multiple Segments down to 1

14 Views

Hi,

I have very limited XI mapping experience. I'm trying to convert the following XML:

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

http://test.com/XI/test">

<Message>

<Field_type>1</Field_type>

<Field>Value1</Field>

</Message>

<Message>

<Field_type>2</Field_type>

<Field>Value2</Field>

</Message>

</ns0:Input_msg>

Into:

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

http://test.com/XI/test">

<field1>Value1</field1>

<field2>Value2</field2>

</ns0:Output_msg>

If Field_type = 1 then put the value of field into field1.

If field_type = 2 then put the value of field into field2.

I created a mapping using IfWithoutElse. It only gives me the following:

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

http://test.com/XI/test">

<field1>Value1</field1>

</ns0:test_msg>

It doesn't put the value in for field2.

Is there a way to do this using XI Mapping functionality?

Thanks,

Jeff