load_xliff( $content ); $data = array(); if ( $xliff && ! $xliff instanceof WP_Error ) { /** @var SimpleXMLElement $node */ foreach ( $xliff->{'file'}->{'body'}->children() as $node ) { $target = $this->get_xliff_node_target( $node ); if ( ! $target && $target !== "0" ) { return $this->invalid_xliff_error(); } $target = $this->replace_xliff_new_line_tag_with_new_line( $target ); $attr = $node->attributes(); $data[ (string) $attr['id'] ] = $target; } } return $data; } }