oxutilsxml.php

Go to the documentation of this file.
00001 <?php
00002 
00006 class oxUtilsXml extends oxSuperCfg
00007 {
00008 
00018     public function loadXml($sXml, $oDomDocument = null)
00019     {
00020         if (!$oDomDocument) {
00021             $oDomDocument = new DOMDocument('1.0', 'utf-8');
00022         }
00023 
00024         libxml_use_internal_errors(true);
00025         $oDomDocument->loadXML($sXml);
00026         $errors = libxml_get_errors();
00027         $blLoaded = empty($errors);
00028         libxml_clear_errors();
00029 
00030         if ($blLoaded) {
00031             return $oDomDocument;
00032         }
00033 
00034         return false;
00035     }
00036 }