NSXMLParser and validation against a DTD on iOS
I have to use NSXMLParser
to parse a XML file, b开发者_Python百科ut I need to validate it against a DTD. What is the best practice? Thank you.
Convert your DTD to an XML Schema then generate code which enforces the validation. See this and then this question.
Edit: Added DTD-to-XSD link.
精彩评论