How to validate xml document against relaxNG schema in libxml++

萝らか妹 提交于 2019-12-11 00:11:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!