static public function extractTagContents($tag, $data)
	{
		$tag = trim($tag, '<> ');
		
		if (false !== strpos($data, '<' . $tag . '>') and 
			false !== strpos($data, '</' . $tag . '>'))
		{
			$data = strstr($data, '<' . $tag . '>');
			$end = strpos($data, '</' . $tag . '>');
			
			return substr($data, strlen($tag) + 2, $end - (strlen($tag) + 2));
		}
		
		return null;
	}
static public function extractTagContents($tag, $data)
	{
		$tag = trim($tag, '<> ');
		
		if (false !== strpos($data, '<' . $tag . '>') and 
			false !== strpos($data, '</' . $tag . '>'))
		{
			$data = strstr($data, '<' . $tag . '>');
			$end = strpos($data, '</' . $tag . '>');
			
			return substr($data, strlen($tag) + 2, $end - (strlen($tag) + 2));
		}
		
		return null;
	}
static public function extractTagContents ( $ tag , $ data ) { $ tag = trim ( $ tag , '<> ' ) ; if ( false !== strpos ( $ data , '<' . $ tag . '>' ) and false !== strpos ( $ data , '</' . $ tag . '>' ) ) { $ data = strstr ( $ data , '<' . $ tag . '>' ) ; $ end = strpos ( $ data , '</' . $ tag . '>' ) ; return substr ( $ data , strlen ( $ tag ) + 2 , $ end - ( strlen ( $ tag ) + 2 ) ) ; } return null ; }
Extract the contents from a particular XML tag in an XML string

<code>
$xml = '<document><stuff>bla bla</stuff><other>ble ble</other></document>';
$contents = QuickBooks_Utilities::_extractTagContents('stuff', $xml);
print($contents); 	// prints "bla bla"
</code>

@param string $tag		The XML tag to extract the contents from
@param string $data		The XML document
@return string			The contents of the tag
Extract the contents from a particular XML tag in an XML string