开发者

Validate xml against xsd using c++

I am very new to XML and c++.

I want to vali开发者_StackOverflow中文版date XML against XSD using C++ API. Can any one give me some tutorial links or sample programs? I don't want to do this using MSXML as it works in Windows and Visual Studio.

I tried to use Xerces and libXML but I have failed. Now I am trying using tinyXML.

Please help me to validate XML against XML schema using c++ (not VC++, should work in cross platform).


You may take a look at libsystools. It's an open-source, multi-platform, x86/x64 C++ library that includes XML (and XML schemas, aka. XSD) support.

It is based on libxml2 but this is hidden.

It also handles a lot of stuff you probably don't want (sockets, openssl, xmlsec) so you might extract the XML classes and use them in your project instead. (Your software will have to be open-source though).

I you want to do so, I suggest you get the last sources using SVN (take the revision 315) and look at the files starting with xml.

Note: The current 2.0 release doesn't have XSD validation support. The next release will be in months, so there is no other way but getting the source from the SVN repository. But that's no big deal.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜