<?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: E4X : Retrieving a sibling of a node</title>
	<atom:link href="http://www.mikechambers.com/blog/2006/08/17/e4x-retrieving-a-sibling-of-a-node/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikechambers.com/blog/2006/08/17/e4x-retrieving-a-sibling-of-a-node/</link>
	<description>code = joy</description>
	<lastBuildDate>Fri, 02 Dec 2011 01:36:37 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Drew</title>
		<link>http://www.mikechambers.com/blog/2006/08/17/e4x-retrieving-a-sibling-of-a-node/comment-page-1/#comment-26812</link>
		<dc:creator>Drew</dc:creator>
		<pubDate>Tue, 28 Jun 2011 06:37:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1046#comment-26812</guid>
		<description>Very useful, but how do you protect against cases where there is no sibling? I tried != undefined or .length()&gt;0 but the script always errors, saying &quot;invalid XML name&quot;.</description>
		<content:encoded><![CDATA[<p>Very useful, but how do you protect against cases where there is no sibling? I tried != undefined or .length()&gt;0 but the script always errors, saying &#8220;invalid XML name&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James O'Reilly</title>
		<link>http://www.mikechambers.com/blog/2006/08/17/e4x-retrieving-a-sibling-of-a-node/comment-page-1/#comment-7002</link>
		<dc:creator>James O'Reilly</dc:creator>
		<pubDate>Sun, 20 Aug 2006 04:57:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1046#comment-7002</guid>
		<description>Maybe Apple was trying to implement a generic parser so that they can add key/value pairs to the XML file at a later date that were not yet known.  I agree that their method does pose some parsing difficulties.  A method I&#039;ve used in the past when I had XML that was not yet known was to make the key and value attributes of the same node.  This way I could keep a strict relationship between the two.  A third attribute was for type casting.  This is what my XML file might have looked like:
[code]

  
  

[/code]My generic parser would go through all of the default nodes and add each one as a key/value pair to a LoadVars variable using the type attribute to properly cast the value.  I was using Flash 7 so LoadVars worked nicely as a Dictionary.  Then, as I started to tweak the XML file with additional defaults, I never had to go back to change the parser.
</description>
		<content:encoded><![CDATA[<p>Maybe Apple was trying to implement a generic parser so that they can add key/value pairs to the XML file at a later date that were not yet known.  I agree that their method does pose some parsing difficulties.  A method I&#8217;ve used in the past when I had XML that was not yet known was to make the key and value attributes of the same node.  This way I could keep a strict relationship between the two.  A third attribute was for type casting.  This is what my XML file might have looked like:<br />
[code]</p>
<p>[/code]My generic parser would go through all of the default nodes and add each one as a key/value pair to a LoadVars variable using the type attribute to properly cast the value.  I was using Flash 7 so LoadVars worked nicely as a Dictionary.  Then, as I started to tweak the XML file with additional defaults, I never had to go back to change the parser.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

