Class XmlNamespace (Excel VBA)
The class XmlNamespace represents a namespace that has been added to a workbook.
Set
To use a XmlNamespace class variable it first needs to be instantiated, for example
Dim strIndex As String: strIndex =
Dim wb As Workbook: Set wb =
Dim xmlnspXmlNamespace As XmlNamespace
Set xmlnspXmlNamespace = wb.XmlNamespaces(Index:=strIndex)
The following procedures can be used to set variables of type XmlNamespace: XmlMap.RootElementNamespace, XmlNamespaces.Item, XmlSchema.Namespace and Workbook.XmlNamespaces
For Each
Here is an example of processing the XmlNamespace items in a collection.
Dim wb As Workbook: Set wb =
Dim xmlnspXmlNamespace As XmlNamespace
For Each xmlnspXmlNamespace In wb.XmlNamespaces
Next xmlnspXmlNamespace
Parent
Returns the parent object for the specified object. Read-only.
Prefix
Returns a String that represents the prefix for the specified XML namespace.
Uri
Returns a String that represents the Uniform Resource Identifier (URI) for the specified XML namespace.
XmlNamespaces.Count
Returns a Long value that represents the number of objects in the collection.
XmlNamespaces.InstallManifest
Installs the specified XML expansion pack on the user's computer, making an XML smart document solution available to one or more users.
For security purposes, you cannot install an unsigned manifest. For more information about manifests, see the Smart Document Software Development Kit (SDK).
Syntax : expression.InstallManifest (Path, InstallForAllUsers)
Application.XMLNamespaces.InstallManifest _
"https://smartdocuments/simplesample/manifest.xml"
Arguments
XmlNamespaces.Item
Returns a single XmlNamespace object from the collection.
Syntax : expression.Item (Index)
Index: The name or index number of the object.
XmlNamespaces.Parent
Returns the parent object for the specified object. Read-only.
XmlNamespaces.Value
Returns a String value that represents the XML namespaces that have been added to the workbook.
If the workbook contains more than one namespace, the namespaces are separated by a blank space in the string returned by the Value property.