xpath
XMLデータでXPathクエリを実行します。
xpath()
関数は、XMLドキュメントでXPathクエリを実行します。
XMLドキュメントでXPathクエリを実行します。
<?php $ note = <<< xml <ノート> <to> george </to> <from> john </from> <見出し>リマインダー</heading> <body>会議を忘れないでください!</body> </note> XML ; $ xml = new SimplexmLelement ( $ note ) ; $ result = $ xml- > xpath ( "/note/to" ) ; print_r ( $ result ) ; ?>
インスタンスを実行します
simplexmlelement :: xpath (パス)
パラメーター | 説明する |
---|---|
パス | 必須。使用するXPathパスを指定します。 |