Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/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
Xslt 解析复杂xml标记_Xslt - Fatal编程技术网

Xslt 解析复杂xml标记

Xslt 解析复杂xml标记,xslt,Xslt,我有下面的xml文件 <sect2> <title>Prophylaxis</title> <para><calc type="weight"/> EXAMPLE DATA</para> <para>2 months</para> </sect2> 预防 示例数据 2个月 我尝试了一些正则表达式,但没有成功 我想使用xslt模板提取

我有下面的xml文件

    <sect2>
      <title>Prophylaxis</title>
      <para><calc type="weight"/> EXAMPLE DATA</para>
      <para>2 months</para>
    </sect2>

预防
示例数据
2个月
我尝试了一些正则表达式,但没有成功


我想使用xslt模板提取“示例数据”。

我假设您希望XPath从XML提取数据,请参阅以下内容或:


这在XSLT中是一项微不足道的任务。花半小时做一个辅导,你就会知道怎么做注意:不要尝试使用正则表达式解析XML:
<xsl:value-of select="//sect2/para"/>