AutoPagerize用のXPathをかんたんに作るためのブックマークレット AutoPagerize IDE - bits and bytesみたいに、ブラウザ上でクリックした要素を表すXPathがほしいことがよくある。perlだったらこないだのXML::LibXML::ElementのnodePathでおしまい。 jsだとFirebugが中にそういうのを持ってる。コンソールに出力されたHTML要素の上にマウスを持っていくと、その要素を表すXPathが表示されるやつ。 extensionからだったらFirebugLib経由で呼び出すことができます。 /** * Gets an XPath for an element which describes its hierarchical location. */ this.getElementXPath = function(element
特定のエレメントからそのエレメントを表すXPathを生成することがよくある。perlだとこれが楽にできるのを XML::Diff — XML DOM-Tree based Diff & Patch Module - search.cpan.org のソースを見てて知った。 XML::LibXML::NodeにnodePathっていうメソッドがある。 This function is not specified for any DOM level: It returns a canonical structure based XPath for a given node. と書いてある通り use XML::LibXML; my $xml = <<'__XML__'; <root> <category> <name>fruit</name> <item> <name>apple</name>
Double Da Vinci Diamonds is the sequel to the hugely popular Da Vinci Diamonds game. It is a slot machine developed by IGT which has 5 reels and 40 paylines. The graphics are fantastic with several works of art by Leonardo da Vinci and the game does not require any download in addition to being available for American players. Apart from being available for real money, there is also a free mode. Th
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く