<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: XPaths with PHP by example</title>
	<atom:link href="http://www.earthinfo.org/xpaths-with-php-by-example/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.earthinfo.org/xpaths-with-php-by-example/</link>
	<description>Down to Earth Information</description>
	<lastBuildDate>Thu, 29 Jul 2010 18:11:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Michael</title>
		<link>http://www.earthinfo.org/xpaths-with-php-by-example/comment-page-1/#comment-5299</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Sat, 24 Jul 2010 12:24:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.earthinfo.org/?p=259#comment-5299</guid>
		<description>Thank you for writing this.  It helped me work out how to use DOMXPath!

I wanted to extract an rss feed from a html document if it existed.  Here&#039;s what I came up with:

$html = new DOMDocument();
@$html-&gt;loadHtmlFile(&#039;http://www.example.com&#039;);
$xpath = new DOMXPath( $html );
$nodelist = $xpath-&gt;query( &quot;//link[@rel=&#039;alternate&#039;]/@href&quot; );
foreach ($nodelist as $n){
echo $n-&gt;nodeValue.&quot;\n&quot;;
}</description>
		<content:encoded><![CDATA[<p>Thank you for writing this.  It helped me work out how to use DOMXPath!</p>
<p>I wanted to extract an rss feed from a html document if it existed.  Here&#8217;s what I came up with:</p>
<p>$html = new DOMDocument();<br />
@$html-&gt;loadHtmlFile(&#8216;http://www.example.com&#8217;);<br />
$xpath = new DOMXPath( $html );<br />
$nodelist = $xpath-&gt;query( &#8220;//link[@rel='alternate']/@href&#8221; );<br />
foreach ($nodelist as $n){<br />
echo $n-&gt;nodeValue.&#8221;\n&#8221;;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alin</title>
		<link>http://www.earthinfo.org/xpaths-with-php-by-example/comment-page-1/#comment-3571</link>
		<dc:creator>alin</dc:creator>
		<pubDate>Thu, 20 May 2010 08:10:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.earthinfo.org/?p=259#comment-3571</guid>
		<description>my Xpath expression for a value from web is : 

/html/body/div[@id=&#039;jive-forumpage&#039;]/table[3]/tbody/tr/td[1]/div[1]/div/table/tbody/tr[1]/td[3]/a[@id=&#039;jive-thread-1&#039;]

i can not query it. muss i remove tbody ?</description>
		<content:encoded><![CDATA[<p>my Xpath expression for a value from web is : </p>
<p>/html/body/div[@id='jive-forumpage']/table[3]/tbody/tr/td[1]/div[1]/div/table/tbody/tr[1]/td[3]/a[@id='jive-thread-1']</p>
<p>i can not query it. muss i remove tbody ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Серфим по XHTML/XML с помощью XPath и PHP &#187; proft.com.ua [Блог о Web, IT, life]</title>
		<link>http://www.earthinfo.org/xpaths-with-php-by-example/comment-page-1/#comment-317</link>
		<dc:creator>Серфим по XHTML/XML с помощью XPath и PHP &#187; proft.com.ua [Блог о Web, IT, life]</dc:creator>
		<pubDate>Tue, 14 Jul 2009 08:57:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.earthinfo.org/?p=259#comment-317</guid>
		<description>[...] XPath Tutorial - Advanced XML Part 1 A guide to using XPath with PHP to scrape web pages Web scraping with PHP and XPath Примеры по DOMDocument и DOMXPath Хорошее [...]</description>
		<content:encoded><![CDATA[<p>[...] XPath Tutorial &#8211; Advanced XML Part 1 A guide to using XPath with PHP to scrape web pages Web scraping with PHP and XPath Примеры по DOMDocument и DOMXPath Хорошее [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
