<?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: Google Module Example : NXSL API</title>
	<atom:link href="http://blog.thestem.ca/archives/25/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.thestem.ca/archives/25</link>
	<description>Brett Forsyth's professional work showcase, photos, and ramblings.</description>
	<lastBuildDate>Sat, 03 Apr 2010 00:45:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Brettf</title>
		<link>http://blog.thestem.ca/archives/25#comment-31</link>
		<dc:creator>Brettf</dc:creator>
		<pubDate>Thu, 16 Feb 2006 15:56:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.thestem.ca/?p=25#comment-31</guid>
		<description>Yup you could do that. I thought about that as well but it seems like so much work trying to get it to do somethings it isn&#039;t supposed to do. So I looked around a bit and found this &lt;a href=&quot;http://xmljs.sourceforge.net/&quot; rel=&quot;nofollow&quot;&gt;XML for script&lt;/a&gt;. They have created a XML W3C parser. This is what I am going to use for my next set of experiments.</description>
		<content:encoded><![CDATA[<p>Yup you could do that. I thought about that as well but it seems like so much work trying to get it to do somethings it isn&#8217;t supposed to do. So I looked around a bit and found this <a href="http://xmljs.sourceforge.net/" rel="nofollow">XML for script</a>. They have created a XML W3C parser. This is what I am going to use for my next set of experiments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cori</title>
		<link>http://blog.thestem.ca/archives/25#comment-30</link>
		<dc:creator>cori</dc:creator>
		<pubDate>Thu, 16 Feb 2006 15:49:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.thestem.ca/?p=25#comment-30</guid>
		<description>Actually, I had a thought about this last night.

Since the output of the nxsl is essentially just a string that you can assign to a variable, you could use something like:

function stripTags(inString){ 
var re= /]*&gt;/g; 
return(inString.replace(re,&quot;&quot;)); 
} 

to strip the tags out of the result.  So you could use your modified version but call out to this function in the alert parameter to get just the string.  Example at http://kinrowan.net/miscellany/flickrtest.xml.

Some of this stuff might be in the NXSL library, but they&#039;ve obfuscated it so badly that I can&#039;t even trace it (or won&#039;t spend the time, at least).  I&#039;m thinking of slapping together a few functions like this one into a library to include into scripts.</description>
		<content:encoded><![CDATA[<p>Actually, I had a thought about this last night.</p>
<p>Since the output of the nxsl is essentially just a string that you can assign to a variable, you could use something like:</p>
<p>function stripTags(inString){<br />
var re= /]*&gt;/g;<br />
return(inString.replace(re,&#8221;"));<br />
} </p>
<p>to strip the tags out of the result.  So you could use your modified version but call out to this function in the alert parameter to get just the string.  Example at <a href="http://kinrowan.net/miscellany/flickrtest.xml" rel="nofollow">http://kinrowan.net/miscellany/flickrtest.xml</a>.</p>
<p>Some of this stuff might be in the NXSL library, but they&#8217;ve obfuscated it so badly that I can&#8217;t even trace it (or won&#8217;t spend the time, at least).  I&#8217;m thinking of slapping together a few functions like this one into a library to include into scripts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brettf</title>
		<link>http://blog.thestem.ca/archives/25#comment-26</link>
		<dc:creator>Brettf</dc:creator>
		<pubDate>Mon, 13 Feb 2006 06:28:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.thestem.ca/?p=25#comment-26</guid>
		<description>Well you&#039;re right Cori. I screwed up. In my example I have it trying to pull the value into the var user_id but that doesn&#039;t work. The NXSL API as I am using it can only create a valid node so you have to have some tag around the value. I have updated the example and am working on how to get only the value. But the way you have gone about solving the problem seems to be the right way.</description>
		<content:encoded><![CDATA[<p>Well you&#8217;re right Cori. I screwed up. In my example I have it trying to pull the value into the var user_id but that doesn&#8217;t work. The NXSL API as I am using it can only create a valid node so you have to have some tag around the value. I have updated the example and am working on how to get only the value. But the way you have gone about solving the problem seems to be the right way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cori</title>
		<link>http://blog.thestem.ca/archives/25#comment-25</link>
		<dc:creator>cori</dc:creator>
		<pubDate>Mon, 13 Feb 2006 02:59:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.thestem.ca/?p=25#comment-25</guid>
		<description>Yep, I tried it as modified with my api key and user name and with your original.  Neither worked so far as I could tell, though the flickr query was successful in both cases.

You can try any rss feed, even yours, and try to retrieve the item/link element.  I can get the element&#039;s content, but can&#039;t set a variable.  It seems to me (though error messages seem not have little support in nxsl) that the problem with setting a variable with nxsl is that there&#039;s no xml formatted text to parse in the user_id template, and since nxsl is essentially enhanced html, without the html wrapper there&#039;s nothing to parse.   But I&#039;m probably wrong there, just inferrence.

It&#039;s a bit of a moot point for me personally because I was essentially trying to figure out how to set an href attribute to the value of the item/link element.  I ended up using the nxsl call to &quot;values&quot; to set that attribute, and it seems to work fine.  That said, I&#039;d love to figure out how to retrieve something like you&#039;re doing and set a variable that I can later use standard javascript on (like getting a substring or something), but as I said I can&#039;t even get your example to work without modification.

If you ant to look at my code, it&#039;s at http://kinrowan.net/miscellany/flickrtest.xml.  I basically added an alert to return the _IG_FetchContent return text to make sure I was getting valid xml and changed to my api key.  I get the xml, but the user_id content doesn;t get set.  I gather it works for you, though.</description>
		<content:encoded><![CDATA[<p>Yep, I tried it as modified with my api key and user name and with your original.  Neither worked so far as I could tell, though the flickr query was successful in both cases.</p>
<p>You can try any rss feed, even yours, and try to retrieve the item/link element.  I can get the element&#8217;s content, but can&#8217;t set a variable.  It seems to me (though error messages seem not have little support in nxsl) that the problem with setting a variable with nxsl is that there&#8217;s no xml formatted text to parse in the user_id template, and since nxsl is essentially enhanced html, without the html wrapper there&#8217;s nothing to parse.   But I&#8217;m probably wrong there, just inferrence.</p>
<p>It&#8217;s a bit of a moot point for me personally because I was essentially trying to figure out how to set an href attribute to the value of the item/link element.  I ended up using the nxsl call to &#8220;values&#8221; to set that attribute, and it seems to work fine.  That said, I&#8217;d love to figure out how to retrieve something like you&#8217;re doing and set a variable that I can later use standard javascript on (like getting a substring or something), but as I said I can&#8217;t even get your example to work without modification.</p>
<p>If you ant to look at my code, it&#8217;s at <a href="http://kinrowan.net/miscellany/flickrtest.xml" rel="nofollow">http://kinrowan.net/miscellany/flickrtest.xml</a>.  I basically added an alert to return the _IG_FetchContent return text to make sure I was getting valid xml and changed to my api key.  I get the xml, but the user_id content doesn;t get set.  I gather it works for you, though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brettf</title>
		<link>http://blog.thestem.ca/archives/25#comment-24</link>
		<dc:creator>Brettf</dc:creator>
		<pubDate>Sun, 12 Feb 2006 22:52:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.thestem.ca/?p=25#comment-24</guid>
		<description>Did you download the xml file? Can you send a  sample of the RSS?</description>
		<content:encoded><![CDATA[<p>Did you download the xml file? Can you send a  sample of the RSS?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cori</title>
		<link>http://blog.thestem.ca/archives/25#comment-23</link>
		<dc:creator>cori</dc:creator>
		<pubDate>Sun, 12 Feb 2006 14:33:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.thestem.ca/?p=25#comment-23</guid>
		<description>Hey Brett;
Good to see someone else is having similar frustrations with Google HP modules.

I can&#039;t get your example to work properly with my flickr key and user name, nor in your example as written.

I&#039;m trying to do something very similar to what you&#039;re doing - essentially to set a variable to be the contents of a single node - in my case the &lt;link&gt; node of an RSS item, but the nxsl template for the select seems not to work.  Have you had luck?</description>
		<content:encoded><![CDATA[<p>Hey Brett;<br />
Good to see someone else is having similar frustrations with Google HP modules.</p>
<p>I can&#8217;t get your example to work properly with my flickr key and user name, nor in your example as written.</p>
<p>I&#8217;m trying to do something very similar to what you&#8217;re doing &#8211; essentially to set a variable to be the contents of a single node &#8211; in my case the &lt;link&gt; node of an RSS item, but the nxsl template for the select seems not to work.  Have you had luck?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
