cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT or Java Mapping

Former Member
0 Kudos
98

Hi..

Below is the XML file.

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

- <ns0:MT_Sender xmlns:ns0="http://Test">

- <Root>

<Input><Node></Input>

</Root>

- <Root>

<Input><Company>Satyam</Company></Input>

</Root>

- <Root>

<Input><NAME>Leela</NAME></Input>

</Root>

- <Root>

<Input><END-Node></Input>

</Root>

</ns0:MT_Sender>

I need to convert the above xml file to correct xml file.

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

- <ns0:MT_Sender xmlns:ns0="http://Test">

- <Root>

<Input><Node></Input>

</Root>

- <Root>

<Input><Company>Satyam</Company></Input>

</Root>

- <Root>

<Input><NAME>Leela</NAME></Input>

</Root>

- <Root>

<Input><END-Node></Input>

</Root>

</ns0:MT_Sender>

I need the output file like

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

- <ns0:MT_Sender xmlns:ns0="http://Test">

- <Root>

<Input><Node></Input>

</Root>

- <Root>

<Input><Company>Satyam</Company></Input>

</Root>

- <Root>

<Input><NAME>Leela</NAME></Input>

</Root>

- <Root>

<Input></Node></Input>

</Root>

</ns0:MT_Sender>

Could you please help in having XSLT or Java mapping for the above requirement.?

Thanks

Leela

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi ,

In your structure , as Stefan has mentioned : <Input><Node></Input> is there...

It can be a valid xml only if the structure is :<Input><Node></Node></Input>

Have a look at this thread for more clarity :

[]

Regards,

D.Laawanya

Edited by: Laawanya Danasekaran on Nov 19, 2008 11:23 AM

Former Member
0 Kudos

Hi,

As said above, it is not possible by any mapping since your XML file is not having a valid structure.

Regads,

Sarvesh

stefan_grube
Active Contributor
0 Kudos

Both are no valid XML files.

So no mapping would help you there.

<Input><Node></Input> would not work.

Regards

Stefan