load_xliff( $content ); $data = array(); /** @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 = str_replace( '
', "\n", $target ); $attr = $node->attributes(); $data[ (string) $attr['id'] ] = $target; } return $data; } }