2012-05-11から1日間の記事一覧

rubyのhpricot でxmlの切り出し

以下の文章のcounts属性を抜出し表示 test.html <head>This is a test. </head> <body> test <dagu elements=xxx> <td counts=3 no=xxx></td> <td counts=4 no=yyy></td> <td counts=hello no=zzz></td> </body> ルビーのソースコード hpricotは, xmlやhtml切り出し用のライブラリ gem install hpricot で入手できる. rubygems をインストール後.ルビーのソース require 'rubygems' req…