QuickBooks/XML.php
static public function decode($str, $for_qbxml = true)
	{
		$transform = array(
			'&lt;' => '<', 
			'&gt;' => '>', 
			'&apos;' => '\'', 
			'&quot;' => '"', 
			'&amp;' => '&', 		// Make sure that this is *the last* transformation to run, otherwise we end up double-un-encoding things
			);
			
		return str_replace(array_keys($transform), array_values($transform), $str);		
	}
static public function decode($str, $for_qbxml = true)
	{
		$transform = array(
			'&lt;' => '<', 
			'&gt;' => '>', 
			'&apos;' => '\'', 
			'&quot;' => '"', 
			'&amp;' => '&', 		// Make sure that this is *the last* transformation to run, otherwise we end up double-un-encoding things
			);
			
		return str_replace(array_keys($transform), array_values($transform), $str);		
	}
Decode a string for use within an XML document

@todo Investigate QuickBooks qbXML encoding and implement solution

@param string $str				The string to encode
@param boolean $for_qbxml
@return string