Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   validate XML with XSD in c++ (http://www.velocityreviews.com/forums/t718229-validate-xml-with-xsd-in-c.html)

uck.larsson 03-20-2010 05:12 AM

validate XML with XSD in c++
 
Hi!

Im pretty new to both XML validation and C++ (more familiar with
Java..) so I guess this is a trivial question.

If I have a XML file and a XSD schema, how is the best way to validate
them? Id like to to this in c++ without using external libraries, or
as little libraries as possible, is it possible? Other ideas of how
this can be done?
I want a simple solution, the output needed is just if the validation
i successful or not.

Any help is appreciated

// Katarina

Martin Honnen 03-20-2010 11:17 AM

Re: validate XML with XSD in c++
 
uck.larsson wrote:

> Im pretty new to both XML validation and C++ (more familiar with
> Java..) so I guess this is a trivial question.
>
> If I have a XML file and a XSD schema, how is the best way to validate
> them? Id like to to this in c++ without using external libraries, or
> as little libraries as possible, is it possible? Other ideas of how
> this can be done?
> I want a simple solution, the output needed is just if the validation
> i successful or not.


I am not familiar with C++ and what is considered core and what is
considered a library but one validating parser that supports validation
against a schema is Xerces C++: http://xerces.apache.org/xerces-c/

If you work on Windows (XP SP 3 or later versions like Windows Vista or
Windows 7) then you can consider MSXML 6 as that is part of the OS:
http://msdn.microsoft.com/en-us/libr...42(VS.85).aspx




--

Martin Honnen
http://msmvps.com/blogs/martin_honnen/

uck.larsson 03-23-2010 06:30 AM

Re: validate XML with XSD in c++
 
On 20 mar, 19:17, Martin Honnen <mahotr...@yahoo.de> wrote:
> uck.larsson wrote:
> > Im pretty new to both XML validation and C++ (more familiar with
> > Java..) so I guess this is a trivial question.

>
> > If I have a XML file and a XSD schema, how is the best way to validate
> > them? Id like to to this in c++ without using external libraries, or
> > as little libraries as possible, is it possible? Other ideas of how
> > this can be done?
> > I want a simple solution, the output needed is just if the validation
> > i successful or not.

>
> I am not familiar with C++ and what is considered core and what is
> considered a library but one validating parser that supports validation
> against a schema is Xerces C++:http://xerces.apache.org/xerces-c/
>
> If you work on Windows (XP SP 3 or later versions like Windows Vista or
> Windows 7) then you can consider MSXML 6 as that is part of the OS:http://msdn.microsoft.com/en-us/libr...42(VS.85).aspx
>
> --
>
> * * * * Martin Honnen
> * * * *http://msmvps.com/blogs/martin_honnen/


Thanks for your replay, Ill give Xerces C++ a closer look, and Im on
Mac OS unfortunately

// Katarina


All times are GMT. The time now is 04:51 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.