Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

XML validation in ABAP

Former Member
0 Kudos

Hello all,

Need a little help,

I have implemeted a program which creates an XML file after an DTD(eq. BMEcat).

How a validation can be implemented in this report which check if the XML file is well formed after the DTD?

To mention that for creating the XML I used DOM from interface repository and the R/3 version is 4.6 C.

Thank you very much!


p.s. sorry for my english!


Former Member
0 Kudos

Hi Bogdan!

To my knowledge SAP only supports DTD validation as of version 6.x - but I might be wrong there.

Under V6.x you can use the method set_validating of the IF_IXML_PARSER interface to turn validation on/off. The document is then checked against your DTD.

I always use an internal DTD (one contained in the XML document) and haven't tried using external DTDs (linked externally) yet - so I don't know if those work.

Hope that helps (please reward me if it does


0 Kudos

Hi Joerg,

I've reward you,

You said that you have include a directive like

<i><!DOCTYPE bmecat SYSTEM "bmecat.dtd"></i> in your XML file(?); but for me this is not so useful because the report must display the cause of the invalitation, so I guess there are no ways to implement the validation in version 4.6C .

Thank you anyway


0 Kudos


g Thanx

Actually I don't include an extarnal DTD with <!... SYSTEM ...!> but rather write the DTD explicitly with my XSL stylesheet.

But using the 6.20 validator gives rather precise error messages like "expected xyz element" etc.

Maybe there is some other way to validate? Like an external program?

Regards, Joerg