Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible to validate xml against xsd using Objc/iPhone code at runtime

I have xml files that I read in at runtime, is it possible to validate the xml against an xsd file at runtime using Obj C?? This can be done in java and c#.. But i need do it run time in my iphone app.

like image 220
Shri Avatar asked Jan 20 '12 10:01

Shri


People also ask

How do I verify an XSD file?

All you have to do is just paste the XML and click on “Check XSD validity” button. In XML Schema Definition (XSD), we can verify: Checking the schema in its value. The same name field by checking its data type.


1 Answers

I don't think you can do this using Obj C on iOS. I think you'll need to use libxml2.

Here's an example of a simple C program that validates XML against XSD.

Here are instructions on adding libxml2 to an XCode project.

like image 178
Eric Avatar answered Oct 03 '22 23:10

Eric