parseURL Method

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - SAX2 Reference

parseURL Method

Parses an XML document from a system identifier (URI).

Note   If you are using Microsoft® Internet Explorer 5.5, you may get an E_PENDING error when you attempt to load an XML file that has external entities. To correct this situation, upgrade to Internet Explorer 5.5, Service Pack 1.
[Visual Basic]

The parseURL method is a shortcut 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.

Usage Syntax

oSAXXMLReader.parseURL(strURL)

Parameters

strURL
The URL to load.

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 ErrorHandler. The ErrorHandler always returns the internal error code to the parseURL method, even if the ErrorHandler raises a user-defined error.

[C/C++]

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.

Syntax

HRESULT ParseURL(
   [in] const wchar_t * pwchUrl);

Parameters

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

Return Values

S_OK
The value returned if parsing is successful.
Other
Either the parser error code or the code returned by the custom ErrorHandler. Unresolved URLs, security, and network errors are returned in the same way.

Remarks

During 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 : IUnknown interface. If the ErrorHandler returns anything but S_OK, parsing is aborted and the parseURL method returns the internal error that stopped the parser. The ErrorHandler always returns the internal error code, even if the ErrorHandler 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.

To view reference information for Visual Basic or C/C++ only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

baseURL Property (Visual Basic) | ISAXErrorHandler Interface | parse Method | putBaseURL Method (C/C++) | putSecureBaseURL Method (C/C++) | secureBaseURL Property (Visual Basic)

Applies to: ISAXXMLReader Interface