日頃より楽天のサービスをご利用いただきましてありがとうございます。 サービスをご利用いただいておりますところ大変申し訳ございませんが、現在、緊急メンテナンスを行わせていただいております。 お客様には、緊急のメンテナンスにより、ご迷惑をおかけしており、誠に申し訳ございません。 メンテナンスが終了次第、サービスを復旧いたしますので、 今しばらくお待ちいただけますよう、お願い申し上げます。
日頃より楽天のサービスをご利用いただきましてありがとうございます。 サービスをご利用いただいておりますところ大変申し訳ございませんが、現在、緊急メンテナンスを行わせていただいております。 お客様には、緊急のメンテナンスにより、ご迷惑をおかけしており、誠に申し訳ございません。 メンテナンスが終了次第、サービスを復旧いたしますので、 今しばらくお待ちいただけますよう、お願い申し上げます。
Latest topics > CSS3セレクタとXPathでの表現の対応表 宣伝。日経LinuxにてLinuxの基礎?を紹介する漫画「シス管系女子」を連載させていただいています。 以下の特設サイトにて、単行本まんがでわかるLinux シス管系女子の試し読みが可能! « getElementsByなんちゃら の代わりにXPathを使う Main Mozilla 24 » CSS3セレクタとXPathでの表現の対応表 - Sep 13, 2007 拡張機能勉強会の時に焚き付けられた、Text Shadowのコード(textshadow.js)を教材にして拡張機能開発のノウハウを解説していくシリーズ。 XPathをノードの検索に活用する方法を紹介したけど、肝心のXPathが書けなきゃ意味がないわけで。でもXPathって、ノードセットがどうとかノードテストがどうとか軸がどうとか修飾がどうとか、い
昨日のエントリのブクマやコメントで jQuery からの移行がめんどう 時代は jQuery のようなコメントがありました。 これらのコメントから おそらく、「XPath が jQuery や YUI、Prototype.js、Dojo、MochiKit などの汎用 JS ライブラリと競合する」と思ってる方が多いのかなと思いました。 結論 XPath は汎用 JS ライブラリとは競合する技術ではなく、共存する技術だと僕は考えています。 理由 汎用的な JS のライブラリには、大きく以下のような機能があります。 DOM ツリー上の要素やノードを取得する DOM に新しい要素やノード、属性、プロパティ、イベントなどを追加する その他、クロスブラウザとか それに対して XPath が提供するのは DOM ツリー上の要素やノードを取得する というシンプルな機能だけです。 つまり、 XPath は汎
\閉鎖予定のサイトも売れるかも?/ アクセスがないサイトもコンテンツ価値で売れる場合も… ドメインの有効期限を更新してサイト売却にトライしてみましょう
つい最近FirefoxのXMLオブジェクトがすごく便利なのを知りました。そして、そのXMLオブジェクトサポートのことをE4X(ECMAScript for XML)と呼んでいたというのを今知りました.... E4Xについては ECMAScript for XML (E4X) 仕様邦訳 を翻訳された nanto_viさんが書かれている E4X in Firefox が詳しいです。 しょせんはさっきE4Xがなんなのかを知った程度なのでちゃんとしたことは他のページを参照していただくことにして、11.2 左辺式 に書かれているアクセサと選別述語演算子でXPathと同じようなことができて、それがXPath以上に便利なところがありますよ、というはなしだけ書こうと思います。 E4XについてECMAScript for XML (E4X) 仕様邦訳序文には このプログラミング言語拡張は、世界中のもっとも大
perlのWeb::Scraperみたいな記述で、ページの中からデータを取り出すwebscraper.jsという小さなjavascriptのライブラリを書きました。 ブックマークレット データを取り出したいページでブックマークレットでwebscraper.jsを読み込んでFirebugコンソールで使います。 ブックマークレット webscraper コードwebscraper.js つかいかた Web::ScraperのSYNOPSISで例としてあげられているebayでapple ipod nanoを検索した結果からデータを取り出すときは 検索結果ページで上のブックマークレットを呼び出してFirebugコンソールで取り出す部分を記述します。 こんなかんじ。 SYNOPSISのperlのコードで変数$ebay_auctionに一度代入されている部分をそのままインラインで書き直すと my $e
HTMLのドキュメントから繰り返し部分をみつけてSITEINFOをつくるAutoPagerize Iteration Detector HTMLのドキュメントから繰り返し部分をみつける - bits and bytesをベースにして、(ページによるけど)3回くらいクリックしたらSITEINFOが作れるAutoPagerize Iteration Detectorという長い名前のFirefox extensionを作りました。 インストール iterd.xpi version 0.12 (supports Firefox 2.0-3.0.0.*) つかいかた 今回はスターバックスさんの店舗検索結果(住所・店名・条件から探す)を例としてご紹介します。 AutoPagerize Iteration Detectorをインストールすると、リンクを右クリックしたときに出てくるメニューにDetect
適当に XPath を試したい時に 以下のようにすれば、簡単に XPath をためせます。 document.evaluate( '//div[@class="hoge"]', // XPath 式 document, // 基準となるノード(要素とか null, // 名前空間の解決方法(適当にやるときは null 6, // 取得する形式の指定(適当にやるときは 6 null // 結果を再利用するかどうか(適当にやるときは null ); 簡単ですね。 document.evaluate、式、ドキュメント、ヌル、6、ヌル。 覚えましたか? でも、これを Firebug で実行するとこうなっちゃいます。 うーん。これではどの要素が選択されたかわかりません>< 不便ですねー。 というわけで、以下のブックマークレットを実行してあげてください。 javascript:void(XPathRe
Warning! 2008/5/22追記:このエントリは情報が不十分だったり間違いが含まれてたりするので、下記URLのページを参考にするようにしてください↓ http://piro.sakura.ne.jp/latest/blosxom/mozilla/xul/2007-09-13_selector-to-xpath.htm CSS3あたりをXPath1.0あたりに変換する表 CSSXPath .class//*[@class="class"]*1 .class//*[contains(concat(" ",@class," ")," class ")]*2 tag//tag #id//*[@id="id"] tag.class#id//tag[@class="class"][@id="id"] .class.class2//*[contains(concat(" ",@class," "
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く