<?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: Dump Debug Method (Like var_dump Function in PHP) and Debug Class</title>
	<atom:link href="http://www.flexer.info/2008/06/25/dump-debug-method-like-var_dump-function-in-php-and-debug-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flexer.info/2008/06/25/dump-debug-method-like-var_dump-function-in-php-and-debug-class/</link>
	<description>flex developers web corner</description>
	<lastBuildDate>Wed, 18 Jan 2012 13:28:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Andrei Ionescu</title>
		<link>http://www.flexer.info/2008/06/25/dump-debug-method-like-var_dump-function-in-php-and-debug-class/comment-page-1/#comment-1803</link>
		<dc:creator>Andrei Ionescu</dc:creator>
		<pubDate>Wed, 03 Feb 2010 17:09:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=212#comment-1803</guid>
		<description>Leon, thanks for your piece of code. Nice approach. It is helpful but it would be great if we could get rid of those ObjectProxy displaying around the dump.</description>
		<content:encoded><![CDATA[<p>Leon, thanks for your piece of code. Nice approach. It is helpful but it would be great if we could get rid of those ObjectProxy displaying around the dump.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leon</title>
		<link>http://www.flexer.info/2008/06/25/dump-debug-method-like-var_dump-function-in-php-and-debug-class/comment-page-1/#comment-1802</link>
		<dc:creator>leon</dc:creator>
		<pubDate>Wed, 03 Feb 2010 13:23:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=212#comment-1802</guid>
		<description>I made some effort to make it support XML.
This var_dump syntax is really handy to keep things uniform when displaying large structures, and share it between XML/JSON/PHP/YAML/Whatever technology.

&lt;pre lang=&quot;actionscript&quot;&gt;// put these as the first lines of recursiveDump()
if (o is XML &#124;&#124; o is XMLList)
{
    var xml:XML = (o is XML) ? o as XML : undefined;
    var xmllist:XMLList = (o is XMLList) ? o as XMLList : undefined;
    o = xml2Object((o is XML) ? xml.toString() : xmllist.toString());
}

internal static function xml2Object(xml:String):Object
{
    var xmlDoc:XMLDocument = new XMLDocument(xml);
    var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(true);
    return decoder.decodeXML(xmlDoc);
}&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>I made some effort to make it support XML.<br />
This var_dump syntax is really handy to keep things uniform when displaying large structures, and share it between XML/JSON/PHP/YAML/Whatever technology.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// put these as the first lines of recursiveDump()</span>
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>o is <span style="color: #0066CC;">XML</span> <span style="color: #66cc66;">||</span> o is XMLList<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">xml</span>:<span style="color: #0066CC;">XML</span> = <span style="color: #66cc66;">&#40;</span>o is <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#41;</span> ? o as <span style="color: #0066CC;">XML</span> : <span style="color: #0066CC;">undefined</span>;
    <span style="color: #000000; font-weight: bold;">var</span> xmllist:XMLList = <span style="color: #66cc66;">&#40;</span>o is XMLList<span style="color: #66cc66;">&#41;</span> ? o as XMLList : <span style="color: #0066CC;">undefined</span>;
    o = xml2Object<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>o is <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#41;</span> ? <span style="color: #0066CC;">xml</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : xmllist.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
internal <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> xml2Object<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">xml</span>:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Object</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">var</span> xmlDoc:XMLDocument = <span style="color: #000000; font-weight: bold;">new</span> XMLDocument<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">xml</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #000000; font-weight: bold;">var</span> decoder:SimpleXMLDecoder = <span style="color: #000000; font-weight: bold;">new</span> SimpleXMLDecoder<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">return</span> decoder.<span style="color: #006600;">decodeXML</span><span style="color: #66cc66;">&#40;</span>xmlDoc<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: leon</title>
		<link>http://www.flexer.info/2008/06/25/dump-debug-method-like-var_dump-function-in-php-and-debug-class/comment-page-1/#comment-1801</link>
		<dc:creator>leon</dc:creator>
		<pubDate>Tue, 02 Feb 2010 12:07:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=212#comment-1801</guid>
		<description>respect, I was planning to write this..but you beat me first :)</description>
		<content:encoded><![CDATA[<p>respect, I was planning to write this..but you beat me first <img src='http://www.flexer.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alivejune</title>
		<link>http://www.flexer.info/2008/06/25/dump-debug-method-like-var_dump-function-in-php-and-debug-class/comment-page-1/#comment-1589</link>
		<dc:creator>alivejune</dc:creator>
		<pubDate>Mon, 20 Apr 2009 07:21:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=212#comment-1589</guid>
		<description>great!</description>
		<content:encoded><![CDATA[<p>great!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei Ionescu</title>
		<link>http://www.flexer.info/2008/06/25/dump-debug-method-like-var_dump-function-in-php-and-debug-class/comment-page-1/#comment-1550</link>
		<dc:creator>Andrei Ionescu</dc:creator>
		<pubDate>Thu, 05 Mar 2009 08:11:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=212#comment-1550</guid>
		<description>Gary, thank you for comment. Is great to hear that the method is helpful to programmers.</description>
		<content:encoded><![CDATA[<p>Gary, thank you for comment. Is great to hear that the method is helpful to programmers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://www.flexer.info/2008/06/25/dump-debug-method-like-var_dump-function-in-php-and-debug-class/comment-page-1/#comment-1549</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Thu, 05 Mar 2009 06:17:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=212#comment-1549</guid>
		<description>Andrei, you were very polite to TiTerm. Your dump is way more useful than ObjectUtil.toString ! The fact that it is recursive makes all the 
difference for me, and the  fact its not in the standard library is 
negligable. Thanks heaps for this ! Exactly what I was looking for.

Gary</description>
		<content:encoded><![CDATA[<p>Andrei, you were very polite to TiTerm. Your dump is way more useful than ObjectUtil.toString ! The fact that it is recursive makes all the<br />
difference for me, and the  fact its not in the standard library is<br />
negligable. Thanks heaps for this ! Exactly what I was looking for.</p>
<p>Gary</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei Ionescu</title>
		<link>http://www.flexer.info/2008/06/25/dump-debug-method-like-var_dump-function-in-php-and-debug-class/comment-page-1/#comment-332</link>
		<dc:creator>Andrei Ionescu</dc:creator>
		<pubDate>Thu, 26 Jun 2008 06:50:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=212#comment-332</guid>
		<description>Thanks for comment. &lt;b&gt;ObjectUtil.toString&lt;/b&gt; is very helpful but has some differences...
&lt;ul class=&quot;ul&quot;&gt;
&lt;li&gt;doesn&#039;t calculate the number of children&lt;/li&gt;
&lt;li&gt;doesn&#039;t display all data types (XML data is not displayed)&lt;/li&gt;
&lt;li&gt;doesn&#039;t display the data type of the leafs&lt;/li&gt;
&lt;li&gt;if you want to dump more than one object you have to put all your objects into an array&lt;/li&gt;
&lt;/ul&gt;
...but these are not major drawbacks so use &lt;b&gt;ObjectUtil.toString&lt;/b&gt; with confidence.</description>
		<content:encoded><![CDATA[<p>Thanks for comment. <b>ObjectUtil.toString</b> is very helpful but has some differences&#8230;</p>
<ul class="ul">
<li>doesn&#8217;t calculate the number of children</li>
<li>doesn&#8217;t display all data types (XML data is not displayed)</li>
<li>doesn&#8217;t display the data type of the leafs</li>
<li>if you want to dump more than one object you have to put all your objects into an array</li>
</ul>
<p>&#8230;but these are not major drawbacks so use <b>ObjectUtil.toString</b> with confidence.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TiTerm</title>
		<link>http://www.flexer.info/2008/06/25/dump-debug-method-like-var_dump-function-in-php-and-debug-class/comment-page-1/#comment-331</link>
		<dc:creator>TiTerm</dc:creator>
		<pubDate>Wed, 25 Jun 2008 13:09:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.flexer.info/?p=212#comment-331</guid>
		<description>nice try,

you can also do  ObjectUtil.toString(testdata), it will give you same result with regular lib.</description>
		<content:encoded><![CDATA[<p>nice try,</p>
<p>you can also do  ObjectUtil.toString(testdata), it will give you same result with regular lib.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

