Verifying XML loaded/saved
Hi all.
I have an application and i want to save and load some data in it using xml (as you do). I could do that quite easily but i want to make sure the data is valid according to a DTD or something. That is, i want the xml document structure to be the same when writing the data from my application and when reading it in. Also, it will mean i don't have to do as much checking to make sure the structure is correct.
So my question is how to do this in Qt. I already know how to read an xml file into a QDomDocument, i just want to know about DTD or schema validation or whatever it is.
thanks
Re: Verifying XML loaded/saved
Have you seen this example ? It shows how to use QXmlSchema to validate xml document based on predefined schema.
Re: Verifying XML loaded/saved
Yes, actually i have. But i am not sure what the difference is between xml schema and DTD. Also, i was wondering if i need to set/validate against a schema when creating and writing the xml. Or is that only necessary when reading it and i should just make sure my code writes the xml correctly?