code: public static function loadString( $xmlString )
      {
          $xmlFile = tempnam( self::getSysTempDir(), 'xml_' );
          file_put_contents( $xmlFile, $xmlString );
          $xml = self::parseXml( $xmlFile );
          unlink( $xmlFile );
          return $xml;
      }
docs: Create XML document from string
  
  @param string $xmlString
  @return Document