Solar_Struct_Xml::_convert()

protected array|Solar_Xml_Struct Solar_Struct_Xml::_convert ( SimpleXMLElement $elem , string $parent = NULL , bool $array = false )

Support method to recursively convert a SimpleXMLElement tree to an array or Solar_Struct; does not retain XML attributes.

Parameters

  • (SimpleXMLElement) $elem: The SimpleXMLElement to work with.

  • (string) $parent: The name of the parent element, if any.

  • (bool) $array: If true, return the result as an array; otherwise, return as a Solar_Struct_Xml object.

Returns

  • (array|Solar_Xml_Struct) The converted SimpleXMLElement tree.

Description

Support method to recursively convert a SimpleXMLElement tree to an array or Solar_Struct; does not retain XML attributes.



Local