Click here to Skip to main content
11,478,896 members (76,075 online)
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 Sergey Alexandrovich Kryukov 200
1 F-ES Sitecore 195
2 Frankie-C 120
3 OriginalGriff 105
4 DamithSL 95
0 Sergey Alexandrovich Kryukov 7,880
1 OriginalGriff 7,341
2 Sascha Lefèvre 3,064
3 Maciej Los 2,491
4 Richard Deeming 2,335


Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 24 Feb 2011
Copyright © CodeProject, 1999-2015
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