Partager via


ISAXXMLReader::parseURL Method (Compact 2013)

3/26/2014

This method parses an XML document from a system identifier (URI). The base URL and secure base URL can be set by the putBaseURL and putSecureBaseURL methods. These methods are shortcuts for reading a document from a system identifier. If the system identifier is a URL, the application must fully resolve the URL before passing it to the reader.

Syntax

HRESULT ParseURL(
  const wchar_t* pwchUrl
);

Parameters

  • pwchUrl
    [in] Pointer to the URL (zero-terminated Unicode string) to load from.

Return Value

  • S_OK
    Returned if parsing is successful.
  • Other
    Returns either the parser error code or the code returned by the custom error handler. Unresolved URLs, security, and network errors are returned in the same way.

Remarks

While parsing, the reader provides information about the XML document through the registered event handlers. If an error occurs during parsing, the reader calls the appropriate method of the ISAXErrorHandler interface. If the error handler returns anything but S_OK, parsing is aborted and the parseURL method returns the internal error that stopped the parser. Note that the error handler always returns the internal error code, even if the error handler returns a user-defined HRESULT to the parseURL method. The reader can return a number of return codes, including, but not limited to E_ACCESSDENIED, INET_E_OBJECT_NOT_FOUND, INET_E_DOWNLOAD_FAILURE, MSG_E_BADSTARTNAMECHAR, or MSG_E_MISSINGSEMICOLON.

Requirements

Header

msxml2.h,
msxml2.idl

Library

uuid.lib

See Also

Reference

ISAXXMLReader
ISAXXMLReader::parse Method