以文本方式查看主题 - 中文XML论坛 - 专业的XML技术讨论区 (http://bbs.xml.org.cn/index.asp) -- 『 DOM/SAX/XPath 』 (http://bbs.xml.org.cn/list.asp?boardid=11) ---- xpath语句查找html固定部分的问题 (http://bbs.xml.org.cn/dispbbs.asp?boardid=11&rootid=&id=43245) |
-- 作者:bisal -- 发布时间:2/12/2007 10:38:00 PM -- xpath语句查找html固定部分的问题 我有一段html代码: <center><b><i>Claims</i></b></center> <hr> <br><br>What is claimed is:<br><br> 1. An extensible and replaceable layered component computing arrangement residing on a <b><i>computer</i></b> coupled to a <b><i>computer</i></b> network, the layered arrangement comprising: a software. 请问我如何用xpath语句编写xsl样式表找到“What is claimed is:<br><br> 1. An extensible and replaceable layered component computing arrangement residing on a <b><i>computer</i></b> coupled to a <b><i>computer</i></b> network, the layered arrangement comprising: a software.”,将这些话提取出来呢? 我写了<xsl:for-each select="//body"> <Content ACLM="{hr[10]}"/> </xsl:for-each> 因为要提出的话在整个html中的第10个hr标记中,所以这么写,但执行时社么都没有提出来啊,这该怎么改呢?谢谢了! qq:173635235 msn:bisal1130@yahoo.com.cn email:bill1130@gmail.com |
-- 作者:Qr -- 发布时间:2/13/2007 12:27:00 PM -- <br><hr>等标记都没有关闭,用XSL+XPath能从中提取数据吗? |
-- 作者:bisal -- 发布时间:2/14/2007 10:20:00 PM -- 问一下 那请问有没有方法可以提取出 “What is claimed is:<br><br> 1. An extensible and replaceable layered component computing arrangement residing on a <b><i>computer</i></b> coupled to a <b><i>computer</i></b> network, the layered arrangement comprising: 呢?谢谢指点了! |
-- 作者:Qr -- 发布时间:2/17/2007 9:48:00 AM -- 用javascript也行。 getElementsByTagName("HR")[9].innerHTML//可取得第10个<hr>的HTML文本 然后即可通过字符串处理的方法实现文本的截取了。
|
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
42.969ms |