菜单切换
FACESOHO知行者
心灵
记录
远方
赞赏工具
源代码
运行
保存
My Book
Chapter 1
Donec velit. Nullam eget tellus...
Chapter 2
Lorem ipsum dolor sit amet....
XML; $sxe=new SimpleXMLElement($xml); $sxe->registerXPathNamespace('c', 'http://example.org/chapter-title'); $result=$sxe->xpath('//c:title'); foreach ($result as $title) { echo $title . "
"; } ?>
运行结果
Chapter 1
Chapter 2