XBRL.php
public static function getXml( $url, $context )
	{
		$xml = null;
		$xml_string = XBRL::getXmlInner( $url, $context );
		if ( $xml_string )
		{
			try
			{
				// Replace the handler because the status test handler traps any error and terminates the session
				$previousHandler = set_error_handler(null);
				$xml = @new SimpleXMLElement( $xml_string );
				set_error_handler( $previousHandler );
			}
			catch( Exception $ex )
			{

			}

			// Example using xpath
			// $elements = $xml->xpath( "/default:schema/default:element[@name='AccountingPolicies']" );
			if ( $xml !== null )
			{
				$ns = $xml->getDocNamespaces();
				foreach ( $ns as $prefix => $namespace )
				{
					$xml->registerXPathNamespace( empty( $prefix ) ? "default" : $prefix, $namespace );
				}
			}
		}

		return $xml;
	}
public static function getXml( $url, $context )
	{
		$xml = null;
		$xml_string = XBRL::getXmlInner( $url, $context );
		if ( $xml_string )
		{
			try
			{
				// Replace the handler because the status test handler traps any error and terminates the session
				$previousHandler = set_error_handler(null);
				$xml = @new SimpleXMLElement( $xml_string );
				set_error_handler( $previousHandler );
			}
			catch( Exception $ex )
			{

			}

			// Example using xpath
			// $elements = $xml->xpath( "/default:schema/default:element[@name='AccountingPolicies']" );
			if ( $xml !== null )
			{
				$ns = $xml->getDocNamespaces();
				foreach ( $ns as $prefix => $namespace )
				{
					$xml->registerXPathNamespace( empty( $prefix ) ? "default" : $prefix, $namespace );
				}
			}
		}

		return $xml;
	}
public static function getXml ( $ url , $ context ) { $ xml = null ; $ xml_string = XBRL :: getXmlInner ( $ url , $ context ) ; if ( $ xml_string ) { try { // Replace the handler because the status test handler traps any error and terminates the session
 $ previousHandler = set_error_handler ( null ) ; $ xml = @ new SimpleXMLElement ( $ xml_string ) ; set_error_handler ( $ previousHandler ) ; } catch ( Exception $ ex ) { } // Example using xpath
 // $elements = $xml->xpath( "/default:schema/default:element[@name='AccountingPolicies']" );
 if ( $ xml !== null ) { $ ns = $ xml -> getDocNamespaces ( ) ; foreach ( $ ns as $ prefix => $ namespace ) { $ xml -> registerXPathNamespace ( empty ( $ prefix ) ? "default" : $ prefix , $ namespace ) ; } } } return $ xml ; }
Accesses and opens an xsd or xml file.  If an http request and caching is enabled
the request will be serviced from the cache.  If caching is enabled and the file
is an http request but no available in the cache it will be cached.

@param string $url The file to access.  Assumes this is a fully qualified file.
@param XBRL_Global $context The singleton containing the global information
@returns A SimpleXMLElement instance or FALSE
Accesses and opens an xsd or xml file . If an http request and caching is enabled the request will be serviced from the cache . If caching is enabled and the file is an http request but no available in the cache it will be cached .