Click here to Skip to main content
15,889,861 members
Please Sign up or sign in to vote.
4.00/5 (1 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

 
Share this answer
 
Comments
Espen Harlinn 24-Feb-11 16:43pm    
msxml is also an obvious option, my 5
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
 
Share this answer
 
v2
Comments
Nish Nishant 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!
Nish Nishant 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).
Please check the following link it might help you.

http://www.codesynthesis.com/projects/xsd/documentation/cxx/parser/guide/
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900