xpath

参考URL

http://www.asahi-net.or.jp/~ps8a-okzk/xml/xpath10/intro.htmlhttp://www.atmarkit.co.jp/aig/01xml/xpath.html http://www.doraneko.org/xml/xpath10/19991116/Overview.htmlxpath2.0http://www.xmlconsortium.org/wg/tech/WD-xpath20-20020816-Japan-wit…

rubyでxpathを使う

require "rexml/document";include REXML;puts XPath.match(Document.new(File.new("test.xml")),"////name") require "rexml/document";include REXML;puts XPath.first(Document.new(File.new("test.xml")),"////name")

xmlstarlet

<inventory title="OmniCorp Store #45x10^3"> <section name="health"> <item upc="123456789" stock="12"> <name>Invisibility Cream</name> <price>14.50</price> <description>Makes you invisible</description> </item> <item upc="445322344" stock="18"> <name>Levitation Salve</name> <price>23.99</price> </item></section></inventory>