IXMLParser::Run

4/8/2010

This method parses the specified amount of XML (in characters).

Syntax

HRESULT Run( 
  long lChars
);

Parameters

  • lChars
    [in] The amount of XML (in characters) to be parsed.

Return Value

The IXMLParser::Run method returns E_PENDING if it is not finished or S_OK when it reaches the end of the input. An amount of -1 means parse as much as it can get from the input stream. If the IXMLParser::PushData method is being used, the IXMLParser::Run method returns E_PENDING until the last buffer is pushed; after that, it will return S_OK. The number given to IXMLParser::Run is just a hint. IXMLParser::Run will still succeed even if the specified number of characters are not left in the input buffer.

If an asynchronous download was started, IXMLParser::Run (-1) will return E_PENDING; as long as the application has a message loop, the download and parsing will occur in the background as data becomes available from URLMON. IXMLParser::GetParserState can be checked periodically; at some point the parser will no longer return XMLPARSER_BUSY. To monitor the progress, use the IXMLParser::Load method, register a new instance of IBindStatusCallback , and watch the IBindStatusCallback::OnProgress calls.

Requirements

Header xmlparser.h
Windows Mobile Pocket PC 2000 and later, Smartphone 2002 and later

See Also

Reference

IXMLParser