IXMLParser::PushData
4/8/2010
This method provides data to the parser by pushing the specified data as a raw buffer containing bytes.
Syntax
HRESULT PushData(
const char * pData,
ULONG ulChars,
BOOL fLastBuffer
);
Parameters
- pData
[in] Pointer to the data to be pushed.
- ulChars
[in] Size, in characters, of the data pointed to by pData.
- fLastBuffer
[in] Indicates whether the current buffer is the last buffer.
Return Value
This function returns S_OK if the function is successful, otherwise an error code is returned.
Remarks
The lowest level way to provide input is as a raw buffer of bytes. The buffer is not NULL terminated. Call the IXMLParser::PushData method with each buffer. IXMLParser::Run will continue to return E_PENDING until IXMLParser::PushData is called with the fLastBuffer argument set to TRUE. An XML token can span multiple buffers.
For example, the first buffer might end with "<!— sample", in which case the parser will return E_PENDING; if the next buffer starts with "bar — ->", the parser will complete the token and call the IXMLNodeFactory interface with the combined COMMENT text "<! — -sampletag — ->".
When IXMLParser::PushData is called with fLastBuffer set to TRUE, the pushing of data should not continue unless the parser is reset first (the parser behavior is undefined otherwise).
Requirements
Header | xmlparser.h |
Windows Mobile | Pocket PC 2000 and later, Smartphone 2002 and later |
See Also
Reference
IXMLParser
IXMLNodeFactory
IXMLParser::Load
IXMLParser::Run
IXMLParser::SetInput
IXMLParser::SetURL