Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.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
Xml 使用XSLT转换标记外等号的文本_Xml_Xslt_Google Search Appliance - Fatal编程技术网

Xml 使用XSLT转换标记外等号的文本

Xml 使用XSLT转换标记外等号的文本,xml,xslt,google-search-appliance,Xml,Xslt,Google Search Appliance,我试图使用XSLT从GSA(Google search appliance)转换XML,但出现以下错误: XmlException:“=”是意外标记。所需的标记为“;” XML具有以下特性: /搜索?q=Testing&site=ActiveCases&lr=&ie=UTF-8&oe=UTF-8&output=xml\u no\u dtd&client=default\u frontend&access=p&sort=date:D:L:d1&getfields=%252a&start=10&s

我试图使用XSLT从GSA(Google search appliance)转换XML,但出现以下错误:

XmlException:“=”是意外标记。所需的标记为“;”

XML具有以下特性:

/搜索?q=Testing&site=ActiveCases&lr=&ie=UTF-8&oe=UTF-8&output=xml\u no\u dtd&client=default\u frontend&access=p&sort=date:D:L:d1&getfields=%252a&start=10&sa=N


如何处理标签外的等号?

问题的根源不是等号;这是安培数。尝试用
替换所有的符号(&A)

该错误的原因是,符号AND开始一个字符的开头。因此,当解析文本时,解析器将符号视为引用的开始。然后它期望实体名()和分号结束引用。
=
不是名称字符,也不是分号,因此会引发错误

另一个选项是将文本包装到CDATA区域:

<NU><![CDATA[/search?q=Testing&site=ActiveCases&lr=&ie=UTF-8&oe=UTF-8&output=xml_no_dtd&client=default_frontend&access=p&sort=date:D:L:d1&getfields=%252a&start=10&sa=N]]></NU>