Freigeben über


input-source Property

 

Specifies the input source for the SAX reader to parse. The input source can be one of the following types: URI, BSTR, VT_ARRAY or VT_UI1, IStream, ISequentialStream types.

JScript Syntax

oSaxReader.putProperty(strProp, varInput);  
varInput = oSaxReader.getProperty(strProp);  

Visual Basic Syntax

oSaxReader.putProperty
(strProp, varInput)  
varInput = oSaxReader.getProperty
(strProp)  

C/C++ Syntax

HRESULT putProperty(BSTR strProp, VARIANT varInput);  
HRESULT getProperty(BSTR strProp, VARIANT* varInput);  

Value

strProp
A BSTR string whose value is "input-source".

varInput
A variant that specifies the input source for the SAX reader to parse. The value can be one of the following types: URI, BSTR, VT_ARRAY or VT_UI1, IStream, ISequentialStream.

Remarks

When the input-source property is set, calling the parse method with a parameter other than NULL produces an error. For example, the following code block would fail since parsing like this will skip the input-source value.

pSAXParser->putProperty ("input-source", "<root>...</root>");  
pSAXParser->parse ("c:\a.xml")  

Likewise, the following would succeed because the first parse call would parse the input source ("<root>...</root>"). The second call could then succeed because the first parse call will have cleared the input source.

pSAXParser->putProperty ("input-source", "<root>...</root>");  
pSAXParser->parse (NULL);  
pSAXParser->parse ("c:\a.xml")   

Applies to

Interface: ISAXXMLReader

Method: putProperty | getProperty

Versioning

Implemented in: MSXML 3.0 and MSXML 6.0

See Also

parse Method1