<?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>Комментарии на: PHP+XML+XPath. Часть 2</title>
	<atom:link href="http://i-novice.net/phpxmlxpath-chast-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://i-novice.net/phpxmlxpath-chast-2/</link>
	<description>Веб-разработка, php скрипты, поисковая оптимизация.</description>
	<lastBuildDate>Fri, 30 Jul 2010 11:10:43 +0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>От: Grave D.</title>
		<link>http://i-novice.net/phpxmlxpath-chast-2/comment-page-1/#comment-1934</link>
		<dc:creator>Grave D.</dc:creator>
		<pubDate>Fri, 12 Dec 2008 06:53:58 +0000</pubDate>
		<guid isPermaLink="false">http://i-novice.net/phpxmlxpath-chast-2/#comment-1934</guid>
		<description>да, вместо $url &#039;test.xml&#039; нужно вбить:)</description>
		<content:encoded><![CDATA[<p>да, вместо $url &#8216;test.xml&#8217; нужно вбить:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: Grave D.</title>
		<link>http://i-novice.net/phpxmlxpath-chast-2/comment-page-1/#comment-1933</link>
		<dc:creator>Grave D.</dc:creator>
		<pubDate>Fri, 12 Dec 2008 06:51:38 +0000</pubDate>
		<guid isPermaLink="false">http://i-novice.net/phpxmlxpath-chast-2/#comment-1933</guid>
		<description>О! Нашел кое что интересное!)))
PHP5 не поддерживет XQuery зато он поддерживает XPath 1.0!

Код для вашего примера!
&lt;strong&gt;$xmlDocument = new DOMDocument();
if ($xmlDocument-&gt;load($url)) {
	$xpath = new DOMXPath($xmlDocument);
	$query = &#039;//bib/book[@year &gt; 1991]&#039;;
	$nodeList = $xpath-&gt;query($query, $xmlDocument);
	header(&#039;Content-Type: text/plain&#039;);
	foreach ($nodeList as $node) {
		echo $xmlDocument-&gt;saveXML($node) . &quot;\r\n&quot;;
	}
}&lt;/strong&gt;
Красиво и никаких лишних классов! Пользуйтесь:)

зы: Логичнее было бы перенести эту обсуждение вот сюда http://i-novice.net/poisk-v-xml-s-pomoshhyu-xquery/
:)</description>
		<content:encoded><![CDATA[<p>О! Нашел кое что интересное!)))<br />
PHP5 не поддерживет XQuery зато он поддерживает XPath 1.0!</p>
<p>Код для вашего примера!<br />
<strong>$xmlDocument = new DOMDocument();<br />
if ($xmlDocument-&gt;load($url)) {<br />
	$xpath = new DOMXPath($xmlDocument);<br />
	$query = &#8216;//bib/book[@year &gt; 1991]&#8216;;<br />
	$nodeList = $xpath-&gt;query($query, $xmlDocument);<br />
	header(&#8217;Content-Type: text/plain&#8217;);<br />
	foreach ($nodeList as $node) {<br />
		echo $xmlDocument-&gt;saveXML($node) . &#8220;\r\n&#8221;;<br />
	}<br />
}</strong><br />
Красиво и никаких лишних классов! Пользуйтесь:)</p>
<p>зы: Логичнее было бы перенести эту обсуждение вот сюда <a href="http://i-novice.net/poisk-v-xml-s-pomoshhyu-xquery/" rel="nofollow">http://i-novice.net/poisk-v-xml-s-pomoshhyu-xquery/</a><br />
 <img src='http://i-novice.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>От: Grave D.</title>
		<link>http://i-novice.net/phpxmlxpath-chast-2/comment-page-1/#comment-1931</link>
		<dc:creator>Grave D.</dc:creator>
		<pubDate>Fri, 12 Dec 2008 05:41:47 +0000</pubDate>
		<guid isPermaLink="false">http://i-novice.net/phpxmlxpath-chast-2/#comment-1931</guid>
		<description>Пробовал и domxml_open_file - та же ошибка.</description>
		<content:encoded><![CDATA[<p>Пробовал и domxml_open_file &#8211; та же ошибка.</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: novice</title>
		<link>http://i-novice.net/phpxmlxpath-chast-2/comment-page-1/#comment-1924</link>
		<dc:creator>novice</dc:creator>
		<pubDate>Thu, 11 Dec 2008 13:32:09 +0000</pubDate>
		<guid isPermaLink="false">http://i-novice.net/phpxmlxpath-chast-2/#comment-1924</guid>
		<description>xmldocfile - это устаревшая (deprecated) функция. Скорее всего поэтому ее не видно. Попробуйте использовать ее аналог - domxml_open_file</description>
		<content:encoded><![CDATA[<p>xmldocfile &#8211; это устаревшая (deprecated) функция. Скорее всего поэтому ее не видно. Попробуйте использовать ее аналог &#8211; domxml_open_file</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: Grave D.</title>
		<link>http://i-novice.net/phpxmlxpath-chast-2/comment-page-1/#comment-1923</link>
		<dc:creator>Grave D.</dc:creator>
		<pubDate>Thu, 11 Dec 2008 12:36:33 +0000</pubDate>
		<guid isPermaLink="false">http://i-novice.net/phpxmlxpath-chast-2/#comment-1923</guid>
		<description>а если оно установлено, а ошибка всё же присутсвует?

&lt;em&gt;phpinfo();&lt;/em&gt;
&lt;strong&gt;domDOM/XML 	enabled &lt;/strong&gt;
DOM/XML API Version 	20031129 
libxml Version 	2.6.32 
HTML Support 	enabled 
XPath Support 	enabled 
XPointer Support 	enabled 
Schema Support 	enabled 
RelaxNG Support 	enabled</description>
		<content:encoded><![CDATA[<p>а если оно установлено, а ошибка всё же присутсвует?</p>
<p><em>phpinfo();</em><br />
<strong>domDOM/XML 	enabled </strong><br />
DOM/XML API Version 	20031129<br />
libxml Version 	2.6.32<br />
HTML Support 	enabled<br />
XPath Support 	enabled<br />
XPointer Support 	enabled<br />
Schema Support 	enabled<br />
RelaxNG Support 	enabled</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: novice</title>
		<link>http://i-novice.net/phpxmlxpath-chast-2/comment-page-1/#comment-1863</link>
		<dc:creator>novice</dc:creator>
		<pubDate>Wed, 26 Nov 2008 11:19:59 +0000</pubDate>
		<guid isPermaLink="false">http://i-novice.net/phpxmlxpath-chast-2/#comment-1863</guid>
		<description>У Вас не установлено расширение DOM XML</description>
		<content:encoded><![CDATA[<p>У Вас не установлено расширение DOM XML</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: alexey</title>
		<link>http://i-novice.net/phpxmlxpath-chast-2/comment-page-1/#comment-1861</link>
		<dc:creator>alexey</dc:creator>
		<pubDate>Wed, 26 Nov 2008 08:52:20 +0000</pubDate>
		<guid isPermaLink="false">http://i-novice.net/phpxmlxpath-chast-2/#comment-1861</guid>
		<description>добрый день, статейка реальная.. это точно.. но почему-то не работает test.php из архива.. выдает что-то такое:
&lt;!--error--&gt;
&lt;b&gt;Fatal error&lt;/b&gt;:  Call to undefined function xmldocfile() in &lt;b&gt;Y:\home\creamax\www\xquery\class_xquery_lite.php&lt;/b&gt; on line &lt;b&gt;163&lt;/b&gt;


в чом может быть проблемма?</description>
		<content:encoded><![CDATA[<p>добрый день, статейка реальная.. это точно.. но почему-то не работает test.php из архива.. выдает что-то такое:<br />
<!--error--><br />
<b>Fatal error</b>:  Call to undefined function xmldocfile() in <b>Y:\home\creamax\www\xquery\class_xquery_lite.php</b> on line <b>163</b></p>
<p>в чом может быть проблемма?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
