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.
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.
- 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.
Is it a generational thing? It seems more and more that folks are jumping right into chapter 7 of the book and then getting completely lost when things from the previous 6 chapters are being referenced and they can't understand why or where they came from.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
It seems to be, and we are seeing more and more of this type of question here. I guess they have all bought into the idea that you can make a lot of money as a developer with minimal training. Just pray they are not working at your bank or local hospital.
Enter name of Team-1:
Enter the name of Team-2
Enter the number of logs:
Invalid entry !
Process returned 0 (0x0) execution time : 23.573 s
Press any key to continue.
Why are you asking for both team names if they are equal? You already have team_1 name so you only need a different name for team_2. You do not need to clear the input array as it will get overwritten on the next gets call. And it skips the first loop because scanf leaves a newline character in the input buffer which then is consumed by the first call to gets. If you did as I have suggested elsewhere you could figure all these things out for yourself.
You have identified "problem area " , so work on problem area first.
No matter how many books you read , they will NEVER tell you that
MAJORITY of errors are typos, and than you will have hidden SYNTAX errors.
The last errors are programming - LOGICAL errors.
Before you compare real INPUTS, you have to have correct program sequence working so emulating the actual inputs would be next step.
You are starting Backward with analysis of logical / real input errors.
PS You have a "numerical" application , so prefacing printed numbers with "minus" sign" seems little odd.
for(i=0; i<log; i++)
printf( "Variable i = %d", i);