Example #1
0
 private static function initialize()
 {
     if (self::$initialized) {
         return self::$rootNode;
     }
     self::$xml = new DOMDocument();
     self::$xml->loadXML("<xml version=\"1.0\" encoding=\"utf-8\" >" . "<root></root></xml>");
     self::$rootNode = self::getRootElement();
     self::$initialized = true;
 }
Example #2
0
	private static function initialize() {
		if (self::$initialized)
			return self::$rootNode;
		$xmlDocument = new DOMDocument();
		$xmlDocument->encoding = 'UTF-8';
		$xmlDocument->appendChild($xmlDocument->createElement('root'));
		self::$initialized = true;
		self::$xml = $xmlDocument;
		self::$rootNode = self::getRootElement();
	}