OXID eShop CE  4.8.12
 All Classes Files Functions Variables Pages
oxutilsxml.php
Go to the documentation of this file.
1 <?php
2 
6 class oxUtilsXml extends oxSuperCfg
7 {
8 
18  public function loadXml( $sXml, $oDomDocument = null )
19  {
20  if ( !$oDomDocument ) {
21  $oDomDocument = new DOMDocument('1.0', 'utf-8');
22  }
23 
24  libxml_use_internal_errors( true );
25  $oDomDocument->loadXML( $sXml );
26  $errors = libxml_get_errors();
27  $blLoaded = empty( $errors );
28  libxml_clear_errors();
29 
30  if ( $blLoaded ) {
31  return $oDomDocument;
32  }
33  return false;
34  }
35 
36 }