问题
I'm rather new to parsing xml in c++ and to xml in general. I'm trying to parse my document with SAXParser from libxml++ library, however, I would also like it to validate my document against a relaxNG schema. I've found that libxml2, which is underneath libxml++, has a relaxNG module, but I was unable to find out how to use its libxml++ binding. Any clues or code snippets would be appreciated.
回答1:
After several tries it occured to me, that there is no relaxNG wrapper in libxml++, that is why I was unable to find anything in the net. Finally I decided to do the thing using libxml2, just for validation purposes, and then parse xml using SAXParser from libxml++.
来源:https://stackoverflow.com/questions/7024396/how-to-validate-xml-document-against-relaxng-schema-in-libxml