cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a textline to an xml structure using xslt

Former Member
0 Kudos

Hi,

I am having a requirement where i need to add a textline to an xml.

scenario: IDOC-File and output format is an xml.

Output should be like this:

&&##AOC0MB000#AD15543390#BOIFCO#Z

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

<messages>

<batch>0800062844</batch>

<message>

<type>VPR</type>

<action>A</action>

.....

....

</body>

</message>

</messages>

The line that has been added to xml is the data that will be coming from IDOC. How can we append the textline to the xml using xslt.Will document() in xslt works for doing this?

Accepted Solutions (0)

Answers (3)

Answers (3)

prateek
Active Contributor
0 Kudos

The required format in ur scenario is not an xml format, so u should not save the file in xml format. U may write an adapter module at receiver to achieve this.

How can we append the textline to the xml using xslt

This is not possible as the output of xsl transformation is an xml file.

Regards,

Prateek

Former Member
0 Kudos

But this is the requirement that we want we need to add the line before the xml.

Former Member
0 Kudos

Hi,

&&##AOC0MB000#AD15543390#BOIFCO#Z

After using this line your output wont be xml. Moreover xml structure starts with

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

Regards