Click here to Skip to main content
11,411,312 members (63,677 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 189
1 Maciej Los 98
2 OriginalGriff 88
3 Sascha Lefévre 85
4 BillWoodruff 80
0 Sergey Alexandrovich Kryukov 8,920
1 OriginalGriff 6,983
2 Maciej Los 3,430
3 Abhinav S 3,248
4 Peter Leow 3,059


Advertise | Privacy | Mobile
Web01 | 2.8.150414.5 | 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