cancel
Showing results for 
Search instead for 
Did you mean: 

Java Mapping - add DOCTYPE

Former Member
0 Kudos

Hello all -

I am getting the output in this format:

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

<Root>

<SubElement>Test</SubElement>

</Root>

How can i achieve the output in this format:

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

<!DOCTYPE XYZ SYSTEM "http://xml.org/xyz.dtd">

<Root>

<SubElement>Test</SubElement>

</Root>

Please let me know how we can achieve this using Java Mapping and not XSLT.

Thanks,

Tirumal

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Tirumal,

When you are creating output structure in java mapping, add this line in the start document event in the output stream.

Thanks,

Prateek

Former Member
0 Kudos

Prateek -

Thanks for the response.

Do we have a step by step approach to how we have to use JAVA mapping?

My scenario is:

1. I am able to generate a cXML file from an IDOC ORDERS message type.

2. I am able to get the <!DOCTYPE ..> line added in the cXML file using the XSLT mapping but there appears to be two extra characters added at the end of the line with '[]'. Read related blogs, bloggers suggsted to use Java mapping as there appears to be a bug in SAP XSLT processor.

3. Since i am new to JAVA mapping, are there any blogs out there which gives us step by step approach to using JAva mapping for IDOC(s)/ORDERS message typ.

Thanks,

Tirumal

moorthy
Active Contributor
0 Kudos

Hi,

Go thru following link for Java Mapping-

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii

Hope this helps..

Regards,

Moorthy

bhavesh_kantilal
Active Contributor
0 Kudos

hi,

for excellent docs on Java mapping, drop me a email.

My email ID is available in my business card.

Regards,

Bhavesh

Former Member
0 Kudos

Moorthy -

That's a lot of information.

Thanks for your response.

- Tirumal

Former Member
0 Kudos

Prateek, Moorthy and Bhavesh -

I was able to get the output that i wanted. Indeed all your blogs and the pdf's that Bhavesh sent were helpful.

I used the SAX parser and was able to solve the problem.

Will award points to all of you.

Thanks,

Tirumal

Answers (0)