Class XmlSchema (Excel VBA)

The class XmlSchema represents an XML schema contained by an XmlMap object. To use a XmlSchema class variable it first needs to be instantiated, for example


Dim xmlsch as XmlSchema
Set xmlsch = ActiveWorkbook.XmlMaps(1).Schemas(Index:=1)

For Each

Here is an example of processing the XmlSchema items in a collection.


Dim xmlschSchema As XmlSchema
For Each xmlschSchema In ActiveWorkbook.XmlMaps(1).Schemas
	
Next xmlschSchema

Name

Returns a String value that represents the friendly name used to identify an XML schema in an XmlMap object.


Dim strName As String
strName = ActiveWorkbook.XmlMaps(1).Schemas(1).Name

Namespace

Returns an XmlNamespace object that represents the target namespace for the specified schema.


Dim xmlnspNamespace As XmlNamespace
Set xmlnspNamespace = ActiveWorkbook.XmlMaps(1).Schemas(1).Namespace

XML

Returns a String value that represents the content of the specified schema.


Dim strXML As String
strXML = ActiveWorkbook.XmlMaps(1).Schemas(1).XML