‎2005 May 16 11:51 AM
Hi all,
I use XML Library for create the XML file. I have the XML schema for this document. Could you tell me how can I declare this XML schema?
Thanks a lot.
Best regards,
Igor.
‎2005 May 18 12:30 PM
Hi Igor,
sorry but I didn't get it. Do you want to validate against your schema? Or do you want a sample document for that schema (I think you mean W3C XML schema)?
Can you describe further details of your problem? And what kind of BASIS release you are using? iXML 4.6C differs slightly from 6.10 and above.
Regards
Tobias
‎2005 May 18 12:49 PM
Hi,
I thought you could only validate against DTDs and XML Schema is not supported (yet)?
Regards, Joerg
‎2005 May 18 12:55 PM
Yes, that's right. And if you are using 4.6C Kernel even validating against a DTD won't work.
Regards
Tobias
‎2005 May 18 1:15 PM
Hi,
So I was right. If you're able to "convert" your XML Schema to an equivalent DTD using it isn't that hard.
When you've initialized your XML parser (IF_IXML_PARSER) you just have to turn on validation by calling <i>set_validating( mode = if_ixml_parser=>co_validate )</i>. When you parse the XML document with the <i>parse( )</i> method you will receive a result <> 0 in case of errors. You can further process these errors using the <i>num_errors( ... )</i> and/or <i>get_error( ... )</i> methods.
Hope this helps (please reward me if it does),
Joerg