<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 22 Nov 2008 06:09:39 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Brian Moon's Blog: Stupid PHP Tricks: Normalizing SimpleXML Data]]></title>
      <guid>http://www.phpdeveloper.org/news/10328</guid>
      <link>http://www.phpdeveloper.org/news/10328</link>
      <description><![CDATA[<p>
<i>Brian Moon</i> has a "stupid PHP trick" posted to his blog today - <a href="http://brian.moonspot.net/2008/06/03/stupid-php-tricks-normalizing-simplexml-data/">normalizing SimpleXML data</a> you've pulled in from just about any external source.
</p>
<blockquote>
Anyhow, one annoying thing about SimpleXML has to do with caching.  When using web services, we often cache the contents we get back.  We were having a problem where we would get an error about a SimpleXML node not existing.
</blockquote>
<p>
They were using memcache to store the information but came across problems when their code tried to use a (sometimes) empty tag. He gives two solutions - one using a recursive function that identifies the empty items and the other that encodes then decodes the object to and from JSON, keeping the values intact.
</p>]]></description>
      <pubDate>Tue, 03 Jun 2008 09:34:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP-GTK Community Site: Easily empty GtkContainer/GtkWindow]]></title>
      <guid>http://www.phpdeveloper.org/news/7407</guid>
      <link>http://www.phpdeveloper.org/news/7407</link>
      <description><![CDATA[<p>
The PHP-GTK Community site has <a href="http://www.php-gtk.eu/code-snippets/empty-container">a quick new post</a> today showing how to create/empty out a GtkContainer or GtkWindow in your code.
</p>
<blockquote>
This function provides an easy way to empty a GtkWindow/GtkContainer. I use it when i need to refresh a part of my app by replacing some widgets with others. It can destroy or preserve the child widgets depending on your needs.
</blockquote>
<p>
They <a href="http://www.php-gtk.eu/code-snippets/empty-container">provide both</a> the code itself and a sample usage - a three line script that shows three ways to use it - empty out a container, empty out the container but keep its children intact, and how to use it in the event of a button click.
</p>]]></description>
      <pubDate>Thu, 08 Mar 2007 08:42:00 -0600</pubDate>
    </item>
  </channel>
</rss>
