original_string: protected static function convertXmlToArray(\SimpleXMLElement $data)
      {
          $result = [];
          foreach ((array) $data as $index => $node) {
              $result[$index] = (\is_object($node)) ? static::convertXmlToArray($node) : trim((string) $node);
          }
  
          return $result;
      }
code: protected static function convertXmlToArray(\SimpleXMLElement $data)
      {
          $result = [];
          foreach ((array) $data as $index => $node) {
              $result[$index] = (\is_object($node)) ? static::convertXmlToArray($node) : trim((string) $node);
          }
  
          return $result;
      }
code_tokens: protected static function convertXmlToArray ( \ SimpleXMLElement $ data ) { $ result = [ ] ; foreach ( ( array ) $ data as $ index => $ node ) { $ result [ $ index ] = ( \ is_object ( $ node ) ) ? static :: convertXmlToArray ( $ node ) : trim ( ( string ) $ node ) ; } return $ result ; }
docstring: Convert a string of XML to an associative array.
  
  @param \SimpleXMLElement $data An XML element node.
  
  @return array An array representing the XML data.
docstring_tokens: Convert a string of XML to an associative array .