XMLDOMComment Object

The XMLDOMComment object contains comments that are in the XML document. The IXMLDOMComment interface implemented by this object inherits the IXMLDOMCharacterData interface and also possesses the same methods and properties as IXMLDOMCharacterData. The IXMLDOMComment interface does not extend the IXMLDOMCharacterData interface.

XMLDOMProcessingInstruction Object

The XMLDOMProcessingInstruction object contains the processing instructions in the document between the <? tag and the ?> tag. The content enclosed in these two tags is divided into the target and data content. The IXMLDOMProcessingInstruction interface implemented by the XMLDOMProcessingInstruction object inherits the IXMLDOMNode interface and has the same methods as the IXMLDOMNode interface. It extends the IXMLDOMNode interface with the following properties:

Extended IXMLDOMProcessingInstruction Properties

Name Description
data Sets or returns the content of the processing instruction, which doesn't contain the target
target Sets or returns the target application to which the processing instruction is directed

XMLDOMImplementation Object

Because different applications that support XML can support different features of XML, the W3C included the XMLDOMImplementation object, which can be used to determine whether certain features are supported in a particular application. The XMLDOMImplementation object implements the IXMLDOMImplementation interface. This interface has one method called hasFeature that returns true if the specified feature is implemented by the specified version of the XML DOM implementation. To see how this object works, add another command button to the frmDOMTest form with the name cmdImplementation and the caption Implementation. Add the following code to the click event of this button:

  Private Sub cmdImplementation _Click()
      Dim objImplementation As IXMLDOMImplementation
      Dim objXMLDoc As DOMDocument
      Set objXMLDoc = New DOMDocument
      objXMLDoc.async = False
      objXMLDoc.Load ("c:\Books.xml")
      Set objImplementation = objXMLDoc.implementation
      'Currently accepted values for feature: XML, DOM, and MS-DOM
      Debug.Print "MS-DOM: " & _
            objImplementation.hasFeature("MS-DOM", "1.0")
      Debug.Print "XML: " & _
            objImplementation.hasFeature("XML", "1.0")
      Debug.Print "DOM: " & _
            objImplementation.hasFeature("DOM", "1.0")
  End Sub

If you have Internet Explorer 5 installed on your computer, running this application and clicking the Implementation button will give you the following results:

  MS-DOM: True
  XML: True
  DOM: True

HasFeature returning true shows that Internet Explorer 5 supports XML, DOM, and the MS-DOM.