<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Electric Fairground &#187; SimpleXML</title>
	<atom:link href="http://www.electricfairground.com/tag/simplexml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.electricfairground.com</link>
	<description>OOOm pa pa, OOOm pa pa . . .</description>
	<lastBuildDate>Sat, 04 Sep 2010 23:39:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Beware of the &amp; (ampersand) character when parsing XML using PHP&#8217;s SimpleXML</title>
		<link>http://www.electricfairground.com/2009/11/15/beware-of-the-ampersand-character-when-parsing-xml-using-phps-simplexml/</link>
		<comments>http://www.electricfairground.com/2009/11/15/beware-of-the-ampersand-character-when-parsing-xml-using-phps-simplexml/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 18:06:47 +0000</pubDate>
		<dc:creator>Lappa</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[ampersand]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[parsing]]></category>
		<category><![CDATA[SimpleXML]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://www.electricfairground.com/2009/11/15/beware-of-the-ampersand-character-when-parsing-xml-using-phps-simplexml/</guid>
		<description><![CDATA[<a href="http://www.electricfairground.com/2009/11/15/beware-of-the-ampersand-character-when-parsing-xml-using-phps-simplexml/"><img align="left" hspace="5" width="150" height="150" src="http://www.ElectricFairground.com/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png" class="alignleft wp-post-image tfe" alt="" title="" /></a>If you are getting errors like &#8220;parser error : EntityRef: expecting &#8216;;&#8217;&#8221; when trying to parse some XML using SimpleXML, it could be because your XML file or string contains an &#038; character. Do the following to remedy the situation: $correct_xml = str_replace('&#038;','&#38;amp;',$problem_xml);]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.electricfairground.com%2F2009%2F11%2F15%2Fbeware-of-the-ampersand-character-when-parsing-xml-using-phps-simplexml%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.electricfairground.com%2F2009%2F11%2F15%2Fbeware-of-the-ampersand-character-when-parsing-xml-using-phps-simplexml%2F&amp;source=robinspots&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>If you are getting errors like &#8220;parser error : EntityRef: expecting &#8216;;&#8217;&#8221; when trying to parse some XML using SimpleXML, it could be because your XML file or string contains an &#038; character. Do the following to remedy the situation:</p>
<pre class="brush: php">
$correct_xml = str_replace('&#038;','&#38;amp;',$problem_xml);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.electricfairground.com/2009/11/15/beware-of-the-ampersand-character-when-parsing-xml-using-phps-simplexml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
