<?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"
	>
<channel>
	<title>Comments on: String Representation of XML Objects in PHP</title>
	<atom:link href="http://bluebones.net/2008/04/string-representation-of-xml-objects-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://bluebones.net/2008/04/string-representation-of-xml-objects-in-php/</link>
	<description>Adventures in Computer Programming</description>
	<pubDate>Wed, 20 Aug 2008 07:02:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: David</title>
		<link>http://bluebones.net/2008/04/string-representation-of-xml-objects-in-php/#comment-21411</link>
		<dc:creator>David</dc:creator>
		<pubDate>Fri, 02 May 2008 19:22:05 +0000</pubDate>
		<guid isPermaLink="false">http://bluebones.net/2008/04/string-representation-of-xml-objects-in-php/#comment-21411</guid>
		<description>How about this:

&lt;pre&gt;
function printXml($xml) {
    if ($xml instanceof DOMDocument) {
	$s = $xml-&#62;saveXML();
    } else if ($xml instanceof DOMNodeList) {
	$s = '';
	foreach ($xml as $node) { $s .= printXml($node); }
    } else {
	$s = $xml-&#62;ownerDocument-&#62;saveXml($xml);
    }
    return $s;
  }
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>How about this:</p>
<pre>
function printXml($xml) {
    if ($xml instanceof DOMDocument) {
	$s = $xml-&gt;saveXML();
    } else if ($xml instanceof DOMNodeList) {
	$s = '';
	foreach ($xml as $node) { $s .= printXml($node); }
    } else {
	$s = $xml-&gt;ownerDocument-&gt;saveXml($xml);
    }
    return $s;
  }
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Aquino</title>
		<link>http://bluebones.net/2008/04/string-representation-of-xml-objects-in-php/#comment-21353</link>
		<dc:creator>Jonathan Aquino</dc:creator>
		<pubDate>Thu, 01 May 2008 00:04:43 +0000</pubDate>
		<guid isPermaLink="false">http://bluebones.net/2008/04/string-representation-of-xml-objects-in-php/#comment-21353</guid>
		<description>Handy!</description>
		<content:encoded><![CDATA[<p>Handy!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
