xml.DomDocument.load

Loads an XML Document into a DomDocument object from a file or an URL.

Syntax

load(
   url STRING )
  1. url is a valid URL or the name of the file.

Usage

Loads an XML Document into a DomDocument object from a file or an URL, where url is a valid URL or the name of the file.

Only the following kinds of URLs are supported: http:// , https:// , tcp:// , tcps:// , file:/// and alias:// . See Web services configuration for more details about URL mapping with aliases, and for proxy and security configuration.

See setFeature() to specify how the document can be loaded. HTML parsing is possible when enable-html-compliancy is enabled.

See getErrorsCount() and getErrorDescription() to retrieve error messages related to XML document loading.

In case of error, the method throws an exception and sets the STATUS variable. Depending on the error, a human-readable description of the problem is available in the SQLCA.SQLERRM register. See Error handling in GWS calls (STATUS).

Important: On Mac OS X versions prior to 10.9, the libxml library (used by Genero Web Services classes) has a bug when parsing HTML documents. If you set the HTML compliancy option with CALL doc.setFeature("enable-html-compliancy",TRUE), loading an HTML document with xml.DomDocument.load() may produce additional blank TEXT nodes, because the libxml library loads some ignorable whitespace nodes from the HTML document. Starting with Mac OS X 10.9, the libxml library of the system has fixed this bug.