private function parseXml(\DOMNode $node, array $context = [])
    {
        $data = $this->parseXmlAttributes($node, $context);

        $value = $this->parseXmlValue($node, $context);

        if (!\count($data)) {
            return $value;
        }

        if (!\is_array($value)) {
            $data['#'] = $value;

            return $data;
        }

        if (1 === \count($value) && key($value)) {
            $data[key($value)] = current($value);

            return $data;
        }

        foreach ($value as $key => $val) {
            $data[$key] = $val;
        }

        return $data;
    }
private function parseXml(\DOMNode $node, array $context = [])
    {
        $data = $this->parseXmlAttributes($node, $context);

        $value = $this->parseXmlValue($node, $context);

        if (!\count($data)) {
            return $value;
        }

        if (!\is_array($value)) {
            $data['#'] = $value;

            return $data;
        }

        if (1 === \count($value) && key($value)) {
            $data[key($value)] = current($value);

            return $data;
        }

        foreach ($value as $key => $val) {
            $data[$key] = $val;
        }

        return $data;
    }
private function parseXml ( \ DOMNode $ node , array $ context = [ ] ) { $ data = $ this -> parseXmlAttributes ( $ node , $ context ) ; $ value = $ this -> parseXmlValue ( $ node , $ context ) ; if ( ! \ count ( $ data ) ) { return $ value ; } if ( ! \ is_array ( $ value ) ) { $ data [ '#' ] = $ value ; return $ data ; } if ( 1 === \ count ( $ value ) && key ( $ value ) ) { $ data [ key ( $ value ) ] = current ( $ value ) ; return $ data ; } foreach ( $ value as $ key => $ val ) { $ data [ $ key ] = $ val ; } return $ data ; }
Parse the input DOMNode into an array or a string.

@return array|string
Parse the input DOMNode into an array or a string .