Loads an XML document from a file, a URL or a string in an
xmlDocument variable.
// Load the RSS stream of the last articles published on pcsoft.fr.windev
Stream is xmlDocument
Stream = XMLOpen("http://forum.pcsoft.fr/rss.awp?groupid=pcsoft.fr.windev&v=2", fromURL)
IF ErrorOccurred = True THEN
Error("Unable to open the RSS stream. Check your Internet connection.")
END
Syntax
Loading an XML document from a file or from a URL Hide the details
<Result> = XMLOpen(<Document source> [, <Type of source>])
<Result>: xmlDocument variable
xmlDocument variable containing the result of the loading and study of XML document.
The ErrorOccurred variable is set to True if an error occurred.
<Document source>: Character string
Corresponds to:- the path of the file containing the XML document (for a file source).
- the URL of XML document (for a URL source).
<Type of source>: Optional Integer constant
Type of source to use: | |
fromFile | <Document source> is the path of XML file. |
fromURL | <Document source> is the URL of an XML file. |
Loading an XML document contained in a string Hide the details
<Result> = XMLOpen(<XML document> , <fromString>)
<Result>: xmlDocument variable
xmlDocument variable containing the result of the loading and study of XML document.
The ErrorOccurred variable is set to True if an error occurred.
<XML document>: Character string
XML code to load.
<fromString>: Integer constant
Type of source to use: | |
fromString | <XML document> is a string containing XML code. |
Remarks
The UTF-8 encoding is used by default if no encoding is specified in the XML document.
Business / UI classification: Business Logic