Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VC8.0 VC9.0
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 19:43pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Comments
Espen Harlinn at 24-Feb-11 16:43pm
   
msxml is also an obvious option, my 5
Rate this: bad
good
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:
Xerces-C++[^]
 
Best regards
Espen Harlinn
  Permalink  
v2
Comments
Nishant Sivakumar at 24-Feb-11 9:54am
   
Espen, he wants a C++ solution. He's tagged it with VC8 and VC9 (meaning C++).
Espen Harlinn at 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 at 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
good
Please Sign up or sign in to vote.

Solution 1

Please check the following link it might help you.
 
http://www.codesynthesis.com/projects/xsd/documentation/cxx/parser/guide/
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 505
1 Maciej Los 325
2 Richard MacCutchan 265
3 Mathew Soji 220
4 BillWoodruff 210
0 OriginalGriff 8,804
1 Sergey Alexandrovich Kryukov 7,457
2 DamithSL 5,689
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411028.1 | Last Updated 24 Feb 2011
Copyright © CodeProject, 1999-2014
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