Loads this FileUpload object from previously obtained from ToXML()

@param	string	$xml
338106
public function FromXML($xml)
	{
		$sxo = new SimpleXMLElement($xml);
		
		if($sxo->encoding == "base64")
		{
			$this->Data = base64_decode($sxo->data);
		}
		else
		{
			$this->Data = $sxo->data;
		}
		
		$this->Name = $attachment->name;
		$this->Type = $attachment->type;
		$this->Size = $attachment->size;
		$this->Extension = $attachment->extension;
	}
467005
protected function convertXmlToArray($xml)
    {
        // Convert the response to an array via a 3-way conversion:
        // - create a simplexml object
        // - convert that to json
        // - convert json to array
        libxml_use_internal_errors(true);
        if (!($result = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA))) {
            $this->raiseLibxmlError(libxml_get_errors());
        }

        if (!($result = json_encode($result))) {
            $this->raiseJsonError();
        }
        if (($result = json_decode($result, true)) === null) {
            $this->raiseJsonError();
        }

        return $result;
    }
27619
public function addXML($xml)
    {
        $next_elem = $this->createDocumentFragment();
        $next_elem->appendXML($xml);
        $this->doc->appendChild($next_elem);

    }
500846
public function load($file)
    {
        if (!file_exists($file)) {
            throw new \RuntimeException(sprintf('The file "%s" does not exists', $file));
        }

        $content = file_get_contents($file);

        // HACK: DOMNode seems to bug when a node is named "param"
        $content = str_replace('<param', '<parameter', $content);
        $content = str_replace('</param', '</parameter', $content);

        $crawler = new Crawler();
        $crawler->addContent($content, 'xml');

        foreach ($crawler->filterXPath('//function') as $node) {
            $method = $this->getMethod($node);
            $this->specification->addMethod($method);
        }
    }
151208
public function loadXml( $xml )
	{
		$this->document	= new DOMDocument();
		$validator	= new XML_Validator();
		if( !$validator->validate( $xml ) ){
			$message	= $validator->getErrorMessage();
			throw new InvalidArgumentException( 'XML is invalid ('.$message.')' );
		}
		$this->document->loadXml( $xml );
		$this->xPath	= new DOMXPath( $this->document );
	}
1315081
public function setXml($xml)
    {
        $class = $this->nodeClass;

        if (!$xml instanceof $class) {
            $xml = new $class((string)$xml);
        }

        $this->xml = $xml;
        return $this;
    }
828599
private function loadXML($url) {
		if (!file_exists($url)) {
			throw new \n2n\log4php\LoggerException("File [$url] does not exist.");
		}

		libxml_clear_errors();
		$oldValue = libxml_use_internal_errors(true);
		
		// Load XML
		$xml = @simplexml_load_file($url);
		if ($xml === false) {
			
			$errorStr = "";
			foreach(libxml_get_errors() as $error) {
				$errorStr .= "[" . $error->file . "] line " . $error->line . " : " . $error->message;
			}
			
			throw new \n2n\log4php\LoggerException("Error loading configuration file: " . trim($errorStr));
		}
		
		libxml_clear_errors();
		libxml_use_internal_errors($oldValue);
		
		return $xml;
	}
445103
protected function parseXML($xml){
        if (!$xml){
            return false;
        }
        
        $this->response = array();
        $this->response['FeedSubmissionId'] = (string)$xml->FeedSubmissionId;
        $this->response['FeedType'] = (string)$xml->FeedType;
        $this->response['SubmittedDate'] = (string)$xml->SubmittedDate;
        $this->response['FeedProcessingStatus'] = (string)$xml->FeedProcessingStatus;
        
        $this->log("Successfully submitted feed #".$this->response['FeedSubmissionId'].' ('.$this->response['FeedType'].')');
    }
971997
private function loadDomDocument(\DOMDocument $dom, $xml, $method)
    {
        return call_user_func_array(
            [$dom, $method],
            // set LIBXML_NONET to prevent local and remote file inclusion attacks.
            [$xml, LIBXML_NONET | LIBXML_DTDATTR | defined('LIBXML_COMPACT') ? LIBXML_COMPACT : 0]
        );
    }
310455
protected function sanitizeXml($xml)
    {
        // Sanitize the XML if requested:
        $newXML = trim(preg_replace($this->sanitizeRegex, ' ', $xml, -1, $count));

        if ($count > 0 && $this->badXmlLog) {
            $this->logBadXML($xml);
        }

        return $newXML;
    }
41424
protected function loadXML($xml)
	{
		$this->checkUnsupported($xml);

		// Activate small nodes allocation and relax LibXML's hardcoded limits if applicable. Limits
		// on tags can be set during configuration
		$flags = (LIBXML_VERSION >= 20700) ? LIBXML_COMPACT | LIBXML_PARSEHUGE : 0;

		$useErrors = libxml_use_internal_errors(true);
		$dom       = new DOMDocument;
		$success   = $dom->loadXML($xml, $flags);
		libxml_use_internal_errors($useErrors);

		if (!$success)
		{
			throw new InvalidArgumentException('Cannot load XML: ' . libxml_get_last_error()->message);
		}

		return $dom;
	}
407541
function load($url) {
            if (empty($url)) return false;
            $this->parseXML(implode('', @file($url)));
        }
231796
public function loadFile()
    {
        $key = $this->getKey();

        $tags = $this->getTags();

        if (!$this->cache->has($key, $tags)) {
            $this->xmlRepo->loadFile();

            $XMLFile = $this->xmlRepo->getFile()->asXML();

            $this->cache->put($key, $XMLFile, $tags, $this->seconds);
        }
    }
879571
public function loadXML(string $XMLfile): void
    {
        $file = new FileManager();
        $this->xmlData = $file->loadLittleFile($XMLfile);
    }
1172932
public static function parse($xml)
    {
        $data = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS);

        if (is_object($data) && get_class($data) === 'SimpleXMLElement') {
            $data = self::arrarval($data);
        }

        return $data;
    }
606404
public static function fromXML($xml)
    {
        $dom = new DOMDocument();
        $dom->loadXML($xml);
        $xpath = new DOMXPath($dom);
        $xpath->registerNamespace('a', self::getNamespace());
        $response = $xpath->query('//a:CaptureNotification');
        if ($response->length == 1) {
            return 
                new OffAmazonPaymentsNotifications_Model_CaptureNotification(
                    $response->item(0)
                );
        } else {
            throw new Exception(
                "Unable to construct " .
                "OffAmazonPaymentsNotifications_Model_CaptureNotification" .
                "from provided XML. Make sure that CaptureNotification" .
                "is a root element"
            );
        }
    }
1276236
private function xmlToElements($xml)
    {
        //====================================================================//
        // Convert XML to Object Recursively
        try {
            $result = simplexml_load_string($xml, "SimpleXMLElement", LIBXML_NOERROR);
        } catch (Exception $ex) {
            $this->fault = $ex->getMessage();

            return false;
        }

        return $result;
    }