<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>AnimeJB Dot Net &#187; xpath</title>
	<atom:link href="http://www.animejb.net/tag/xpath/feed" rel="self" type="application/rss+xml" />
	<link>http://www.animejb.net</link>
	<description>The house that Jen built.</description>
	<lastBuildDate>Mon, 12 Apr 2010 03:16:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.4" -->
		<copyright>2006-2007 </copyright>
		<managingEditor>calophi@gmail.com (AnimeJB Dot Net)</managingEditor>
		<webMaster>calophi@gmail.com (AnimeJB Dot Net)</webMaster>
		<category>posts</category>
		<ttl>1440</ttl>
<br />
<b>Warning</b>:  htmlentities() expects at most 3 parameters, 4 given in <b>/homepages/9/d94157882/htdocs/animejbNET/wp-content/plugins/podpress/podpress_feed_functions.php</b> on line <b>31</b><br />
		<itunes:keywords></itunes:keywords>
<br />
<b>Warning</b>:  htmlentities() expects at most 3 parameters, 4 given in <b>/homepages/9/d94157882/htdocs/animejbNET/wp-content/plugins/podpress/podpress_feed_functions.php</b> on line <b>31</b><br />
		<itunes:subtitle></itunes:subtitle>
<br />
<b>Warning</b>:  htmlentities() expects at most 3 parameters, 4 given in <b>/homepages/9/d94157882/htdocs/animejbNET/wp-content/plugins/podpress/podpress_feed_functions.php</b> on line <b>31</b><br />
		<itunes:summary></itunes:summary>
		<itunes:author>AnimeJB Dot Net</itunes:author>
		<itunes:category text="Society &amp; Culture"/>
		<itunes:owner>
			<itunes:name>AnimeJB Dot Net</itunes:name>
			<itunes:email>calophi@gmail.com</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://www.animejb.net/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<image>
			<url>http://www.animejb.net/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
			<title>AnimeJB Dot Net</title>
			<link>http://www.animejb.net</link>
			<width>144</width>
			<height>144</height>
		</image>
		<item>
		<title>JavaScript XPath Support</title>
		<link>http://www.animejb.net/2006/06/29/javascript-xpath-support</link>
		<comments>http://www.animejb.net/2006/06/29/javascript-xpath-support#comments</comments>
		<pubDate>Thu, 29 Jun 2006 16:02:20 +0000</pubDate>
		<dc:creator>Calophi</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[xpath]]></category>

		<guid isPermaLink="false">http://www.animejb.net/2006/06/29/javascript-xpath-support/</guid>
		<description><![CDATA[At work some of my tasks have led me to fooling around with new interface ideas.  I figured this is a good way to get up to scratch with AJAX and related ideas.
Now if you&#8217;re pulling in XML with AJAX you know that it can be a perfect pain to parse the file.  [...]]]></description>
			<content:encoded><![CDATA[<p>At work some of my tasks have led me to fooling around with new interface ideas.  I figured this is a good way to get up to scratch with AJAX and related ideas.</p>
<p>Now if you&#8217;re pulling in XML with AJAX you know that it can be a perfect pain to parse the file.  You&#8217;ve got to make sure that the file is converted into a document element (and the methods for doing so are unfortunately not cross-browser), and even afterwards there&#8217;s no cross-browser method to finding the tags you want &#8211; at least not one that will give you clean code.  Basically, your choices are:</p>
<ul>
<li><code>getElementsByTagName()</code> &#8211; it works, but the function is long, and you&#8217;ll have more loops and nests than you can shake a stick at.  Also, you&#8217;re limited to tags.</li>
<li>Functions such as <code>firstChild</code> and <code>childNodes</code> &#8211; which again, leads to long code and lots of nesting.  Plus, using these you don&#8217;t even know what the tags are you&#8217;re messing with, and heaven forbid you change the XML schema a bit, if you didn&#8217;t well-document your javascript it could take you a bit to find the lines you need to alter.</li>
<li>XPath and XSLT transformations &#8211; which are sadly not cross-browser and in some cases don&#8217;t even exist in certain browsers.</li>
</ul>
<p><span id="more-44"></span></p>
<p>That third option is what this post is really all about.  After doing some research I have found a few lovely developers who created a wrapper for Internet Explorer to help it behave similarly to Mozilla, thus creating nice cross-browser XML parsers.  Here are the three bigger ones.</p>
<ul>
<li><a href="https://sourceforge.net/projects/sarissa/">Sarissa</a> is my personal favorite of the three.  It&#8217;s a cross browser library that handles making document objects, <code>xmlHTTPRequest</code>, xPath parsing, XML to XSLT transformations, and converting XML into strings.  There is a lot of documentation on it, the forums are fairly active, it&#8217;s an active project, AND besides working for Mozilla and IE, it also partically supports Safari and Opera (which have incomplete native functionality).</li>
<li><a href="http://glazkov.com/blog/archive/2004/04/06/168.aspx">Glazkov&#8217;s XPath Parser</a> is by far the easiest of the three to use.  It lets you use XPath parsing to traverse through the HTML DOM.  I was pretty pleased with it and even managed to make a few wrapper functions for it to make it even easier to use.  Unfortuantely, through, it only works with objects that are in your normal document&#8217;s DOM &#8211; that is, it won&#8217;t work on an XML type document.  Bummage.  It&#8217;s also been put in hiatus.  Still, if you&#8217;re only using it to go through your own DOM, it&#8217;s the best one to go with.</li>
<li><a href="http://goog-ajaxslt.sourceforge.net/">Google AJAXSLT</a> &#8211; I&#8217;m really only including this because it&#8217;s Google.  It does, from what I can tell, AJAX calls, XPath parsing, and XML to XSLT transformations. The project itself isn&#8217;t terribly well documented and has been stagnant since October 2005.  However people seem to enjoy it and they use something similar to this for <a href="http://www.google.com/apis/homepage/guide.html#XML">Google Homepages</a>, and they&#8217;ve said recently that the project isn&#8217;t abandoned, just not a priority.  So if you can figure out how to use it, it&#8217;s probably pretty neat.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.animejb.net/2006/06/29/javascript-xpath-support/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
