Skip to main content

RGXML

Class RGXML

Handles the formatting and output of XML content

Source: xml.php:11

Details​

  • Kind: class
  • Namespace: (global)

Methods​

MethodDescription
__construct()RGXML constructor.
serialize()Serializes an array into an XML string
unserialize()Unserializes XML into an object to be used in PHP

Method Reference​

__construct()​

public function __construct( $options=[] )

RGXML constructor.

Parameters​

NameTypeDefaultDescription
$optionsarray[]

Source: xml.php:26

serialize()​

public function serialize( $parent_node_name, $data, $path="" )

Serializes an array into an XML string

Parameters​

NameTypeDefaultDescription
$parent_node_namestringThe parent XML node name
$dataarrayThe data to serialize
$pathstring""Optional. The path inside the parent node.

Returns​

  • string — The serialized XML string

Source: xml.php:58

unserialize()​

public function unserialize( $xml_string )

Unserializes XML into an object to be used in PHP

Parameters​

NameTypeDefaultDescription
$xml_stringstringThe XML string to be unserialized

Returns​

  • array — The unserialized array

Source: xml.php:135