Share via


ISAXXMLReader::getBaseURL Method

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method returns the base URL for the document.

Syntax

HRESULT getBaseURL(
  const wchar_t** ppwchBaseUrl
); 

Parameters

  • ppwchBaseUrl
    [out] Pointer to the pointer to the base URL (zero-terminated Unicode string) for the document.

Return Value

  • S_OK
    Returned if the URL is successfully returned.

Remarks

The base URL represents the URL of the current XML document. The reader uses this base URL to resolve relative links (either for those links related to the parseURL method or for external entities in an XML document). To resolve these links, the reader uses the base URL in much the same way that an Internet browser uses a Web page's URL to resolve relative links contained on that page.

The base URL may be a complete URL. However, the reader only uses that portion of the URL up to and including the final backslash when resolving links. For instance, a base URL for a document is "https://msdn.microsoft.com/xml/test.xml". The reader would then only use "https://msdn.microsoft.com/xml/" when resolving links.

Here is an example of how the reader uses the base URL to resolve links. The base URL for a document is "https://msdn.microsoft.com/xml/test.xml". In that document, there is a link for "mytest.xml". The reader would resolve this link as "https://msdn.microsoft.com/xml/mytest.xml".

Requirements

Header msxml2.h, msxml2.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

ISAXXMLReader::putBaseURL Method
ISAXXMLReader::getSecureBaseURL Method
ISAXXMLReader::putSecureBaseURL Method
ISAXXMLReader