cancel
Showing results for 
Search instead for 
Did you mean: 

File receiver - xml beautifier

gabor_hornyak
Explorer
0 Kudos

Hi experts,

I have a simple Idoc2File scenario where the resulting file contains all the xml content in a single line.

Is there a way to get it in a nice intended format? (xml beautifier functionality)

many thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I think you can make use of XSLT mapping in this case.

-Supriya.

Answers (4)

Answers (4)

gabor_hornyak
Explorer
0 Kudos

ok, I managed to solve it with xslt mapping:

I imported the following xsl into IR and added a second msg mapping in the interface mapping:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!-- Author: Gábor Hornyák -->

<xsl:stylesheet version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" indent="yes"/>

<xsl:template match="/">

<!-- copy payload -->

<xsl:copy-of select="." />

</xsl:template>

</xsl:stylesheet>

gabor_hornyak
Explorer
0 Kudos

Hi Gouri,

I agreee with you that the single line xml should be ok.

The problem is that my company is using an old thirdparty software which is processing the xml file.

I dont know the software itself but it is not using a correct parser. Apparently it was designed to multiline xml files and I have no choice, I have to feed it that way.

I am looking now for xslt solution as suggested.

Does anyone have already an xslt for that?

thanks

Gabor

Former Member
0 Kudos

Hi,

Which XML tool they are using? There must be some way or setting to upload such single line XML files.

For XSLT, can you go through below link.

[http://www.stylusstudio.com/xsllist/200601/post50330.html]

-Gouri

Former Member
0 Kudos

Hi,

Even though all the XML content is in single line, the file should be correct. and if just for understanding purpose u need to see, then why dont you try opening the file in Internet Explorer?

-Gouri

Former Member
0 Kudos

This can be achieved by using XSLT mapping

Thanks,