<?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: XML string to PHP array</title>
	<atom:link href="http://gaarf.info/2009/08/13/xml-string-to-php-array/feed/" rel="self" type="application/rss+xml" />
	<link>http://gaarf.info/2009/08/13/xml-string-to-php-array/</link>
	<description>here be my blog</description>
	<lastBuildDate>Thu, 10 May 2012 17:54:37 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Rohan Sehgal</title>
		<link>http://gaarf.info/2009/08/13/xml-string-to-php-array/comment-page-1/#comment-208021</link>
		<dc:creator>Rohan Sehgal</dc:creator>
		<pubDate>Thu, 10 May 2012 17:54:37 +0000</pubDate>
		<guid isPermaLink="false">http://gaarf.info/?p=358#comment-208021</guid>
		<description>Really helpful functions!!

Thanks a lot!! :)</description>
		<content:encoded><![CDATA[<p>Really helpful functions!!</p>
<p>Thanks a lot!! <img src='http://gaarf.info/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PHP: XML to Array &#124; nickmallare.com</title>
		<link>http://gaarf.info/2009/08/13/xml-string-to-php-array/comment-page-1/#comment-208007</link>
		<dc:creator>PHP: XML to Array &#124; nickmallare.com</dc:creator>
		<pubDate>Thu, 10 May 2012 12:51:18 +0000</pubDate>
		<guid isPermaLink="false">http://gaarf.info/?p=358#comment-208007</guid>
		<description>[...] simple post for today. A HUGE thanks to @gaarf for his [...]</description>
		<content:encoded><![CDATA[<p>[...] simple post for today. A HUGE thanks to @gaarf for his [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zeeshan</title>
		<link>http://gaarf.info/2009/08/13/xml-string-to-php-array/comment-page-1/#comment-206532</link>
		<dc:creator>zeeshan</dc:creator>
		<pubDate>Mon, 09 Apr 2012 11:35:08 +0000</pubDate>
		<guid isPermaLink="false">http://gaarf.info/?p=358#comment-206532</guid>
		<description>nice man. keep it up</description>
		<content:encoded><![CDATA[<p>nice man. keep it up</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ad</title>
		<link>http://gaarf.info/2009/08/13/xml-string-to-php-array/comment-page-1/#comment-206360</link>
		<dc:creator>ad</dc:creator>
		<pubDate>Thu, 05 Apr 2012 03:30:40 +0000</pubDate>
		<guid isPermaLink="false">http://gaarf.info/?p=358#comment-206360</guid>
		<description>Please post feature requests to github for discussion</description>
		<content:encoded><![CDATA[<p>Please post feature requests to github for discussion</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Werner</title>
		<link>http://gaarf.info/2009/08/13/xml-string-to-php-array/comment-page-1/#comment-205836</link>
		<dc:creator>Werner</dc:creator>
		<pubDate>Fri, 23 Mar 2012 14:34:31 +0000</pubDate>
		<guid isPermaLink="false">http://gaarf.info/?p=358#comment-205836</guid>
		<description>@Rasmus 

So far, ad&#039;s code handles more XML documents than yours. Be it ugly, it&#039;s definitely more useful IMHO.</description>
		<content:encoded><![CDATA[<p>@Rasmus </p>
<p>So far, ad&#8217;s code handles more XML documents than yours. Be it ugly, it&#8217;s definitely more useful IMHO.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian</title>
		<link>http://gaarf.info/2009/08/13/xml-string-to-php-array/comment-page-1/#comment-204266</link>
		<dc:creator>Christian</dc:creator>
		<pubDate>Fri, 10 Feb 2012 01:37:57 +0000</pubDate>
		<guid isPermaLink="false">http://gaarf.info/?p=358#comment-204266</guid>
		<description>Great job, thank you very much!</description>
		<content:encoded><![CDATA[<p>Great job, thank you very much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Lee</title>
		<link>http://gaarf.info/2009/08/13/xml-string-to-php-array/comment-page-1/#comment-197944</link>
		<dc:creator>Tim Lee</dc:creator>
		<pubDate>Tue, 27 Dec 2011 18:44:57 +0000</pubDate>
		<guid isPermaLink="false">http://gaarf.info/?p=358#comment-197944</guid>
		<description>I was wondering if you could modify this to support multiple parent nodes in the xml? Right now if I give it this xml:
&lt;code&gt;

  
    
      Brian
      Chris
      Meg
      &lt;![CDATA[&lt;em&gt;Stewie&lt;/em&gt;]]&gt;
    
    
      
      
      0
    
  
  
    you
  
&lt;/code&gt;

I get this as a result:
&lt;code&gt;
Array
(
)
&lt;/code&gt;

This code works fine if the &quot;testing&quot; node is within the tv node, like so:
&lt;code&gt;

  
    
      Brian
      Chris
      Meg
      &lt;![CDATA[&lt;em&gt;Stewie&lt;/em&gt;]]&gt;
    
    
      
      
      0
    
  
    you
  
  
&lt;/code&gt;

Is this something you could look into?

Thanks,
Tim</description>
		<content:encoded><![CDATA[<p>I was wondering if you could modify this to support multiple parent nodes in the xml? Right now if I give it this xml:<br />
<code></p>
<p>      Brian<br />
      Chris<br />
      Meg<br />
      &lt;![CDATA[<em>Stewie</em>]]&gt;</p>
<p>      0</p>
<p>    you</p>
<p></code></p>
<p>I get this as a result:<br />
<code><br />
Array<br />
(<br />
)<br />
</code></p>
<p>This code works fine if the &#8220;testing&#8221; node is within the tv node, like so:<br />
<code></p>
<p>      Brian<br />
      Chris<br />
      Meg<br />
      &lt;![CDATA[<em>Stewie</em>]]&gt;</p>
<p>      0</p>
<p>    you</p>
<p></code></p>
<p>Is this something you could look into?</p>
<p>Thanks,<br />
Tim</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ad</title>
		<link>http://gaarf.info/2009/08/13/xml-string-to-php-array/comment-page-1/#comment-193822</link>
		<dc:creator>ad</dc:creator>
		<pubDate>Mon, 12 Dec 2011 23:06:18 +0000</pubDate>
		<guid isPermaLink="false">http://gaarf.info/?p=358#comment-193822</guid>
		<description>@Ben: could you make a patch and submit a pull request to https://github.com/gaarf/XML-string-to-PHP-array ?</description>
		<content:encoded><![CDATA[<p>@Ben: could you make a patch and submit a pull request to <a href="https://github.com/gaarf/XML-string-to-PHP-array" rel="nofollow">https://github.com/gaarf/XML-string-to-PHP-array</a> ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://gaarf.info/2009/08/13/xml-string-to-php-array/comment-page-1/#comment-193818</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Mon, 12 Dec 2011 22:52:13 +0000</pubDate>
		<guid isPermaLink="false">http://gaarf.info/?p=358#comment-193818</guid>
		<description>One slight mod (added code) to the github.com code repository fixes both the &quot;empty to array&quot; issue and the &quot;non printing zeros issue&quot; for me (swiping @Jonathan&#039;s code and modifying it slightly):

From the clean code at github.com above the line &quot;$output[$t][] = $v;&quot; put the following :

&lt;code&gt;
          if(empty($v) &amp;&amp; $v !== &#039;0&#039;) {
           $v = &quot;&quot;;
          }
&lt;/code&gt;

This enables the zeros to show up in the array, otherwise zeros in the xml like &lt;code&gt;0&lt;/code&gt; show up as empty.

Again, fantastic code. The best XML to Array PHP function out there, hands down. This code should be polished/vetted and incorporated into the PHP core functions at a lower level, really. Would save a lot of people a lot of frustration.</description>
		<content:encoded><![CDATA[<p>One slight mod (added code) to the github.com code repository fixes both the &#8220;empty to array&#8221; issue and the &#8220;non printing zeros issue&#8221; for me (swiping @Jonathan&#8217;s code and modifying it slightly):</p>
<p>From the clean code at github.com above the line &#8220;$output[$t][] = $v;&#8221; put the following :</p>
<p><code><br />
          if(empty($v) &amp;&amp; $v !== '0') {<br />
           $v = "";<br />
          }<br />
</code></p>
<p>This enables the zeros to show up in the array, otherwise zeros in the xml like <code>0</code> show up as empty.</p>
<p>Again, fantastic code. The best XML to Array PHP function out there, hands down. This code should be polished/vetted and incorporated into the PHP core functions at a lower level, really. Would save a lot of people a lot of frustration.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kontur</title>
		<link>http://gaarf.info/2009/08/13/xml-string-to-php-array/comment-page-1/#comment-187641</link>
		<dc:creator>kontur</dc:creator>
		<pubDate>Thu, 17 Nov 2011 11:12:58 +0000</pubDate>
		<guid isPermaLink="false">http://gaarf.info/?p=358#comment-187641</guid>
		<description>Thanks for posting this code. I was struggling with php&#039;s own simpleXML, trying to wrap my head around how to deal with different namepspaces. Your function, however, was all sufficient to get two simple fields from the xml!

Thanks also to Aurelien for the fix on the empty string issue. ;)</description>
		<content:encoded><![CDATA[<p>Thanks for posting this code. I was struggling with php&#8217;s own simpleXML, trying to wrap my head around how to deal with different namepspaces. Your function, however, was all sufficient to get two simple fields from the xml!</p>
<p>Thanks also to Aurelien for the fix on the empty string issue. <img src='http://gaarf.info/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

