Name

xmlschema.XML

Synopsis

Returns the schema definition as a string. Omits whitespace characters such as tabs and line feeds. The following code displays the schema definition for an XML map in the Debug window:

Set xmap = ThisWorkbook.XmlMaps("Orders_Map")
xsd = xmap.Schemas(1).xml
Debug.Print PrettyPrint(xsd)

The PrettyPrint helper function formats the XML to add tabs and line feeds. PrettyPrint is defined in Chapter 14 and is included with the sample code.

Get Programming Excel with VBA and .NET 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.