Inferring Schema

The XML editor can automatically generate an XML schema document (XSD) based on a valid XML document. While the XML document is open, select Create Schema from the XML main menu. This creates an XSD document and opens it in the XML Schema Designer (more on this in the next section). From there, you can make any necessary changes to the XSD document and save it to disk. You can also include it in your project at this point.

Note

If you run the Create Schema command against an XML document that already contains a DTD or XDR schema, the XML inference algorithm uses these schemas as the basis for the conversion as opposed to the actual data within the XML document.

Get Microsoft Visual Studio 2015 Unleashed, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.