Freigeben über


Authoring XML schema (XSD) with InfoPath - Part II

Like I mentioned earlier, it is very easy to use InfoPath as an XML schema editor, with very little extra work:

 

  1. Choose Design a form… from the File Menu in InfoPath.
  2. In the Design a new form task pane, select New Blank Form. Note, if you want to derive a schema from existing XML document or data connection, choose one of the New from… options and skip to step 4) below.
  3. On the Design Tasks pane, click on Data Source to show the Data Source Pane. Right click on the myFields element, you will see a shortcut menu. Starting there, you can create data source structure that models your need.
  4. Once you are done, go to File menu, Extract form files… , then quit InfoPath. Go to the folder you just saved extracted form files, you should find myschema.xsd is what you want. Note: if you are deriving a schema, the schema you want may not be defined directly inside myschema.xsd, but imported there.
  5. (Optional) Open myschema.xsd in your favorite XML or text editor, remove the my namespace auto-generated by InfoPath or replace it with your desired namespace URI.

 

And that is it!


Have a nice day and thanks for listening to me murmuring!

Comments