首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Python > 纯Python执行XPath

纯Python执行XPath

  • 资源大小:43.14 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: python xml xpath DOM

资 源 简 介

py-dom-xpath is a pure Python implementation of XPath 1.0. It supports almost all XPath 1.0, with the main exception being the namespace axis. It operates on DOM 2.0 nodes, and works well with xml.dom.minidom. py-dom-xpath requires Python 2.5 or greater. Simple queries are easy: >>> xpath.find("//item", doc)[, ] Namespaces are fully supported (although the namespace axis is not): >>> context = xpath.XPathContext()>>> context.namespaces["py"] = "http://python.example.org/">>> context.findvalues("//py:skit/@name", doc)[u"argument", u"lumberjack", u"parrot"] XPath variables are also supported: >>> xpath.find("//chapter[@name = $name]", doc, name="Python")[] py-dom-xpath uses

文 件 列 表

py-dom-xpath-0.1
doc
ez_setup.py
LICENSE
PKG-INFO
py_dom_xpath.egg-info
README
setup.cfg
setup.py
tests
xpath
yapps2

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
0.227829s