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

Validating generated XML file with DTD

Former Member
0 Likes
738

Hello all,

my requirement is to test the XML file with its DTD.

we are creating an XML file, before writing it on the application server , we need to test it with its DTD.

i found one method set_validating in the interface if_ixml_parser , for validating XML file, but not getting an idea how to use it, like how to link the DTD to XML etc.

if i try to use the above method am getting the following error:

Unable to retrieve the external entity 'd:\dtdfile.dtd'.

where 'd:\dtdfile.dtd' is the path of the DTD file included in the Doctype of the XML file.

Please help me to solve this.

Thx in advance.

3 REPLIES 3
Read only

valter_oliveira
Active Contributor
0 Likes
632

Do you have SAP XI (or PI)?

If so, you can send your xml to XI, validate it with your DTD file in a java module, and retrieve the result to you.

Regards,

Valter Oliveira.

Read only

0 Likes
632

hi,

we do not have XI or PI. we are creating an XML file in ABAP and sending it to application server, application server side, it receives only XML files.

regards,

sippy

Read only

0 Likes
632

Hello,

Did you find your answer ?

I know how to validate an XML file an internal DTD, but not an external one... If you know, can you pelase advice ?

If you didn't found yet, you need to use method get_reason() to get the description of the error.

best regards,

Gilles.