<?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: &#8220;Brief&#8221; Guide to JavaScript &#8211; Part 5</title>
	<atom:link href="http://blog.jeffhui.net/2009/07/brief-guide-to-javascript-part-5/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jeffhui.net/2009/07/brief-guide-to-javascript-part-5/</link>
	<description>A blog about programming and random other things.</description>
	<lastBuildDate>Thu, 18 Feb 2010 04:02:15 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: jeffhui</title>
		<link>http://blog.jeffhui.net/2009/07/brief-guide-to-javascript-part-5/comment-page-1/#comment-105</link>
		<dc:creator>jeffhui</dc:creator>
		<pubDate>Mon, 26 Oct 2009 08:14:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jeffhui.net/2009/07/brief-guide-to-javascript-part-5/#comment-105</guid>
		<description>Thanks. Covering XPath is definitely a better option; I always had a sense of ignorance that XPath wasn&#039;t consistent.&lt;br&gt;&lt;br&gt;For people that are interested, most javascript frameworks actually utilize XPath for selectors. XPath is a browser-supported implementation for traversing XML-trees, like HTML.</description>
		<content:encoded><![CDATA[<p>Thanks. Covering XPath is definitely a better option; I always had a sense of ignorance that XPath wasn&#39;t consistent.</p>
<p>For people that are interested, most javascript frameworks actually utilize XPath for selectors. XPath is a browser-supported implementation for traversing XML-trees, like HTML.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ppds</title>
		<link>http://blog.jeffhui.net/2009/07/brief-guide-to-javascript-part-5/comment-page-1/#comment-104</link>
		<dc:creator>ppds</dc:creator>
		<pubDate>Tue, 20 Oct 2009 09:46:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jeffhui.net/2009/07/brief-guide-to-javascript-part-5/#comment-104</guid>
		<description>Your explanation is clear. However, a very efficient way to play with DOM in Javascript (and other languages for that matter is to use XPath). Here is a sample code to go trough all link nodes inside the dom document and do something with them:&lt;br&gt;&lt;br&gt;var findPattern = &quot;//a&quot;;   // This is the xpath pattern. You can use more powerful xpathes&lt;br&gt;var resultLinks = document.evaluate( findPattern, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ); &lt;br&gt;&lt;br&gt;var i=0;&lt;br&gt;while ( (res = resultLinks.snapshotItem(i) ) !=null ){&lt;br&gt;//do something to the link&lt;br&gt;i += 1;&lt;br&gt;}</description>
		<content:encoded><![CDATA[<p>Your explanation is clear. However, a very efficient way to play with DOM in Javascript (and other languages for that matter is to use XPath). Here is a sample code to go trough all link nodes inside the dom document and do something with them:</p>
<p>var findPattern = &#8220;//a&#8221;;   // This is the xpath pattern. You can use more powerful xpathes<br />var resultLinks = document.evaluate( findPattern, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ); </p>
<p>var i=0;<br />while ( (res = resultLinks.snapshotItem(i) ) !=null ){<br />//do something to the link<br />i += 1;<br />}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->