Lizmap Web Client 3.11.0

XmlTools
in package

Table of Contents

Methods

xmlFromFile()  : SimpleXmlElement|string
Interprets an XML file into an object.
xmlFromString()  : SimpleXmlElement|string
Interprets a string of XML into an object.
xmlReaderFromFile()  : XMLReader
Interprets an XML file into an XML pull parser.
xmlReaderFromString()  : XMLReader
Interprets a string of XML into an XML Pull parser.
xmlErrorMsg()  : string
Get XML error message.

Methods

xmlFromFile()

Interprets an XML file into an object.

public static xmlFromFile(string $xml_path) : SimpleXmlElement|string
Parameters
$xml_path : string

the path to the xml file

Return values
SimpleXmlElement|string —

an object of class SimpleXMLElement with properties containing the data held within the XML document, or a string containing the error message

xmlFromString()

Interprets a string of XML into an object.

public static xmlFromString(string $xml_str) : SimpleXmlElement|string
Parameters
$xml_str : string

a well-formed XML string

Return values
SimpleXmlElement|string —

an object of class SimpleXMLElement with properties containing the data held within the XML document, or a string containing the error message

xmlReaderFromFile()

Interprets an XML file into an XML pull parser.

public static xmlReaderFromFile(string $xml_path) : XMLReader

It acts as a cursor going forward on the document stream and stopping at each node on the way.

Parameters
$xml_path : string

the path to the xml file

Return values
XMLReader —

an object of class XMLReader with properties at the root document element containing the data held within the XML document

xmlReaderFromString()

Interprets a string of XML into an XML Pull parser.

public static xmlReaderFromString(string $xml_str) : XMLReader

It acts as a cursor going forward on the document stream and stopping at each node on the way.

Parameters
$xml_str : string

a well-formed XML string

Return values
XMLReader —

an object of class XMLReader with properties at the root document element containing the data held within the XML document

xmlErrorMsg()

Get XML error message.

private static xmlErrorMsg() : string

Build an error message based on LibXMLError object

Return values
string —

the error message

On this page

Search results