How to Read/Write schema file .xsd in c++
-
I want to create schema file xsd file programmatically in c++ so that i can add validation information for each element and read back the tree structure with validation. Is this possible in c++?
-
I want to create schema file xsd file programmatically in c++ so that i can add validation information for each element and read back the tree structure with validation. Is this possible in c++?
That seems a bit odd. The normal process for using an xsd would be as follows. 1. Create the xsd manually. 2. Create program to accept xml as input 3. Validate the input from 2 using 1. Nothing it the above really has anything to do with a "tree'. One can use the xsd to automatically generate classes which can be used to parse and consume the input. At least in my experience validating the input that way (exclusively in terms of the xsd) doesn't lead to very useful errors. However using the xsd itself as a input along with the xml leads to better errors. But that could have had to do with the generation framework that I was using.
-
Yes, of course it is possible, assuming that you understand how to create the schema in the first place. Take a look at some of the links at: create xsd schema - Google Search[^].
I wanted to programmatically create/read xsd file in c++? We have lot of tools to generate xsd from xml and vice versa... We also have lot of example in .net but wanted it in c++ code. I am using msxml6 to parse xml files and wanted to do the same for xsd files aswell.
-
That seems a bit odd. The normal process for using an xsd would be as follows. 1. Create the xsd manually. 2. Create program to accept xml as input 3. Validate the input from 2 using 1. Nothing it the above really has anything to do with a "tree'. One can use the xsd to automatically generate classes which can be used to parse and consume the input. At least in my experience validating the input that way (exclusively in terms of the xsd) doesn't lead to very useful errors. However using the xsd itself as a input along with the xml leads to better errors. But that could have had to do with the generation framework that I was using.
This is my task in vc++ - To create GUI for user to add tree structure where each tree node can contain attribute, restrictions etc.. - Once user configures we write it to xsd files. - If user want to alter he reopens xsd file and alters any properties of xsd file. possible?
-
I wanted to programmatically create/read xsd file in c++? We have lot of tools to generate xsd from xml and vice versa... We also have lot of example in .net but wanted it in c++ code. I am using msxml6 to parse xml files and wanted to do the same for xsd files aswell.
-
This is my task in vc++ - To create GUI for user to add tree structure where each tree node can contain attribute, restrictions etc.. - Once user configures we write it to xsd files. - If user want to alter he reopens xsd file and alters any properties of xsd file. possible?