\XmlToArray
XML To Array conversion
- Author: SOFORT AG (integration@sofort.com)
- Copyright: 2010-2014 SOFORT AG
- License: Released under the GNU LESSER GENERAL PUBLIC LICENSE (Version 3)
Synopsis
class XmlToArray
{
- // members
- private $_CurrentXmlToArrayNode $_CurrentXmlToArrayNode = NULL;
- private static array $_htmlEntityExceptions = ;
- private integer $_maxDepth = 0;
- private Object $_Object = NULL;
- private array $_tagStack = ;
- // methods
- public XmlToArray __construct()
- public array|bool log()
- public static array render()
- public array toArray()
- private void _contents()
- private void _default()
- private void _end()
- private void _start()
Members
private
- $_CurrentXmlToArrayNode
—
$_CurrentXmlToArrayNode
Reference to the current node the parser is at - $_Object
—
Object
Object reference for logging purposes - $_htmlEntityExceptions
—
array
Array of entities which are not in the translation table used by htmlspecialchars and htmlentities - $_maxDepth
—
int
stop parsing when maxDepth is exceeded, defaults to no maximum (=0). - $_tagStack
—
array
Holds start tags in a row.
Methods
private
- _contents() — Handles cdata of the XML (user data between the tags)
- _default() — Default handler for all other XML sections not implemented as callback
- _end() — Handler for end tags
- _start() — Handler for start tags
public
- __construct() — Loads XML into array representation.
- log() — Log messages (debugging purpose)
- render() — Static entry point
- toArray() — Returns parsed XML as array structure