xml.DomDocument.loadFromString

Loads an XML Document into a DomDocument object from a string.

Syntax

loadFromString(
   str STRING )
  1. str is the string to load.

Usage

Loads an XML Document into a DomDocument object from a string, where str is the string to load.

CAUTION:
Not part of W3C API.

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 with the appropriate error number.