Skip to content

Instantly share code, notes, and snippets.

@mcraz
Created December 23, 2013 06:02
Show Gist options
  • Save mcraz/8092317 to your computer and use it in GitHub Desktop.
Save mcraz/8092317 to your computer and use it in GitHub Desktop.
Get XML from URL (CDATA as Text)
public function getXML($uri = NULL)
{
$xml = simplexml_load_file($uri, "SimpleXMLElement", LIBXML_NOCDATA);
return $xml;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment