LoadXML()

Syntax

Result = LoadXML(#XML, Filename$ [, Encoding])
Description
Loads a XML tree from the specified file.

Parameters

#XML A number to identify the new XML. #PB_Any can be used to auto-generate this number.
Filename$ The filename to load the XML from.
Encoding (optional) The encoding to use when loading the XML tree (this overwrites the encoding set in the XML declaration). Valid values are:
  #PB_UTF8 (default)
  #PB_Ascii
  #PB_Unicode
This parameter should be used when the document does not have an XML declaration, or the encoding information is provided outside of the XML document, for example through a mime type header in a communication protocol.

Return value

Nonzero if the file could be opened and read. Note that this does not mean that the XML contained in the file was valid. To check for parser errors XMLStatus() should be used. In case of a parsing error, all data parsed before the error is accessible in the XML tree. If #PB_Any was used for the #XML parameter then the generated number is returned on success.

See Also

CreateXML(), FreeXML(), ParseXML(), CatchXML()

Supported OS

All

<- IsXML() - XML Index - MainXMLNode() ->