Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 转换时防止在XML文件中添加LF_Php_Xml_Ascii_Xmlconvert - Fatal编程技术网

Php 转换时防止在XML文件中添加LF

Php 转换时防止在XML文件中添加LF,php,xml,ascii,xmlconvert,Php,Xml,Ascii,Xmlconvert,我使用PHP将XML转换为XML 虽然转换运行得很好,但在HTML标记之后显示了LF。即: The weather was <i>nice</i> and Eve was feeling lucky. 同时发布您的代码让我们看看?尚不清楚$this->setData()的作用。还有一点,您是将HTML转换为(X)HTML还是将一种XML格式转换为另一种XML格式?该程序将XML转换为另一种XML,$this->setData()部分将解释该程序,数据将在新XML中转换

我使用PHP将XML转换为XML

虽然转换运行得很好,但在HTML标记之后显示了LF。即:

The weather was <i>nice</i> and Eve was feeling lucky. 

同时发布您的代码让我们看看?尚不清楚
$this->setData()
的作用。还有一点,您是将HTML转换为(X)HTML还是将一种XML格式转换为另一种XML格式?该程序将XML转换为另一种XML,$this->setData()部分将解释该程序,数据将在新XML中转换为哪个字段。
The weather was <i>nice</i>**LF**

and Eve was feeling lucky.
case 'Texte':
$this->setData('body', $domElement);