![]() The controls within the group box are created based on some simplistic rules from information gathered from the schema. There's also some straightforward math regarding indenting and calculating the size of the outer groupbox, which I'm not going to discuss. Point p=ConstructGUI(relx+20, rely+20, dt2, gb1, ct2) ![]() XmlSchemaComplexType ct2=GetGlobalComplexType() XmlSchemaElement el2=GetLocalElement(ct, dt2.TableName) Get child relationships, which are displayed as indented groupboxes foreach (DataRelation childRelation in dt.ChildRelations) Some Background Basics: Importing the Schema and XML Documents Then load the sale5.xml file using the File/Load XML menu item. Load the sampleSchema2.XSD file first using the File/Load XSD menu item. The download includes an example XSD and XML file. which is derived from the schema (screenshot from my XML Schema Editor): Utilizing the XmlDataDocument, XmlSchema and DataTable classes, I have created a generic editor that dynamically creates specialized controls for data entry, based on the schema definition and table relationships.Īn example of the result is: (Sorry about the long picture!) Thus, I decided to write my own XML data editor and, in the process, learn more about XSD, XML, and XPath. NET solution, which is to create a CS file, is a complicated, multi-step and non-generic approach. For me, the tags are a major encumberance to quickly putting together a data set. All of the editors I found were oriented around editing the entire XML document, tags and all, not just the data. I did not find anything that came close to meeting these two criteria.
0 Comments
Leave a Reply. |