Click to return to the XML (Extensible Markup Language) home page    
XMLDOMProcessingInstructi...     XMLDOMProcessingInstructi...    
Web Workshop  |  XML (Extensible Markup Language)

target Property


Specifies the target, the application to which this processing instruction is directed.

Syntax

strValue = oXMLDOMProcessingInstruction.target

Remarks

String. The property is read-only. XML defines the target as the first token following the markup that begins the processing instruction. For example, the target has the value xml in the processing instruction <?xml version="1.0">.

The target property has the same value as the nodeName property.

Example

The following example iterates through the document's child nodes. If it finds a node of type NODE_PROCESSING_INSTRUCTION (7), it displays the node's target:

Dim xmlDoc

Set xmlDoc = CreateObject("microsoft.xmldom")
xmlDoc.load("c:\books.xml")
For i = 0 TO (xmlDoc.childNodes.length -1)
  If xmlDoc.childNodes.item(i).nodeType = 7 Then 
    msgBox xmlDoc.childNodes.item(i).target
  End If
Next

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
XMLDOMProcessingInstruction


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.