Freigeben über


processingInstruction Method

 

Receives notification of a processing instruction. The reader invokes the processingInstruction method once for each processing instruction found. Processing instructions can occur before or after the main document element.

Visual Basic Implementation Syntax

Sub processingInstruction(strTarget As String, strData As String)  

Parameters

strTarget
The target for the processing instruction. The target is the first piece of the processing instruction. For example, xml-stylesheet is the target for the following processing instruction: <?xml–stylesheet type="text/css" href="sample.css"?>.

strData
The processing instruction data, or Null (if none is supplied). For example, type="text/css" href="sample.css" is the data for the following processing instruction: <?xml–stylesheet type="text/css" href="sample.css"?>

Return Values

If failed, the ContentHandler raises a trappable error.

C/C++ Syntax

HRESULT processingInstruction(  
   [in] const wchar_t * pwchTarget,  
   [in] int cchTarget,  
   [in] const wchar_t * pwchData,  
   [in] int cchData);  

Parameters

pwchTarget[in]
The target for the processing instruction. The target is the first piece of the processing instruction. For example, xml-stylesheet is the target for the following processing instruction: <?xml–stylesheet href="sample.css" type="text/css" title="Sample" ?>.

cchTarget[in]
The length of the target string.

pwchData[in]
The processing instruction data, or Null (if none is supplied).

cchData[in]
The length of the processing instruction string.

Return Values

S_OK
The value returned if no errors occur.

E_FAIL
The value returned if the parse operation should be aborted.

Versioning

Implemented in: MSXML 3.0 and later

Applies to

ISAXContentHandler Interface