Click here to Skip to main content
13,090,299 members (90,461 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi every one, My problem is to create an xml file from a xsd file. The thing i want is to know how can I parse the xsd file to know its attribute and type? Also the hierarchical order should be known. I surfed the net and theresult was not fruitful. Most articles where to validate the xml but nothing said precisely about it. Thanks for the help in advance.
Posted 23-Feb-11 18:43pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Espen Harlinn 24-Feb-11 16:43pm
msxml is also an obvious option, my 5
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

You can use the XML Schema Definition Tool[^] to generate c# code based on your xml schema.

The generated code can be used to easily read and write your xml files.

Updated for C++
A good C++ validating xml parser can be found at:

Best regards
Espen Harlinn
Nishant Sivakumar 24-Feb-11 9:54am
Espen, he wants a C++ solution. He's tagged it with VC8 and VC9 (meaning C++).
Espen Harlinn 24-Feb-11 11:13am
Updated the answer to point at Xerces-C++ for a quality validating XML parser - thank for pointing this out Nishant!
Nishant Sivakumar 24-Feb-11 11:14am
No problem, and now I've voted this a 5.

I myself recommended the built-in MSXML parser below but Xerces may be easier to use (depending on his preference to use COM or not).
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Please check the following link it might help you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170813.1 | Last Updated 24 Feb 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100