April 2006
Beginner
1114 pages
98h 16m
English
You can get the schema used by an XML map through the Schemas collection. Each XML map has one schema and you can’t add or delete schemas through the Schemas collection.
Use the Schema object’s Xml method to return the schema used by an XML map. The Xml method returns the schema without whitespace, so you will want to use a formatting helper function such as PrettyPrint when displaying the schema, as shown here:
Dim xmap As XmlMap, xsd As String
Set xmap = ThisWorkbook.XmlMaps("Order_Map")
xsd = xmap.Schemas(1).xml
Debug.Print PrettyPrint(xsd)
PrettyPrint is defined in Chapter 14 and is provided with the sample files.
Read now
Unlock full access