cancel
Showing results for 
Search instead for 
Did you mean: 

Formatting XML file to avoid mapping parser error

Former Member
0 Kudos

Hi,

We have requirement in our project to process input xml file which is of the below format:

<message>

<data>

<xml version=1.0 code=utf/>

<test>

<data>book</data>

</test>

</data></message>

Since <xml> tag is at the middle it is throwing a exception error in mapping.

Actual requirment is that we need

<test>

<data>book</data>

</test>

The xml of the above format is generated by some external system which PI need to pick it.

I think is not possible in XSLT mapping as it is not starting with xml tag .

So please let me know pointer ot resolve the issue.

Thanks in advance.

Accepted Solutions (0)

Answers (3)

Answers (3)

RaghuVamseedhar
Active Contributor
0 Kudos

Hi Yeshwanth,

If this input XML. Then it is valid XML.

<message>
  <data>
    <xml version="1.0" code="utf" />
    <test>
      <data>book</data>
    </test>
  </data>
</message>

Please paste the error message, input and expected output XML.

Regards,

Raghu_Vamsee

Edited by: Raghu Vamsee on Aug 25, 2011 12:10 PM

former_member200962
Active Contributor
0 Kudos

if your source system is generating such a file then you need to make use of JAVA mapping to read the input message .....then use replace function to remove the <xml> tag and then generate the output with a valid format.

But cant the source system generate a proper XML format?

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Yeshwanth,

Could you please confirm the data what you receiving from source system is valid XML?