Пример #1
0
protected static function data_initialize ()
{
	self::$data_document = new DOMDocument(self::data_xml_version, self::data_xml_encoding);
	self::$data_element =
		self::$data_document->createElementNS(self::data_xml_ns_uri, self::data_xml_ns_prefix . ':' . 'data');
		self::$data_element -> setAttributeNS(self::data_xml_ns_uri, self::data_xml_ns_prefix . ':' . 'version'      , self::version()    );
		self::$data_element -> setAttributeNS(self::data_xml_ns_uri, self::data_xml_ns_prefix . ':' . 'version_major', self::version_major);
		self::$data_element -> setAttributeNS(self::data_xml_ns_uri, self::data_xml_ns_prefix . ':' . 'version_minor', self::version_minor);
		self::$data_element -> setAttributeNS(self::data_xml_ns_uri, self::data_xml_ns_prefix . ':' . 'version_patch', self::version_patch);
	self::$data_document->appendChild(self::$data_element);

	self::$data_xpath = new DOMXPath(self::$data_document);
	self::$data_xpath->registerNamespace("coren", self::data_xml_ns_uri);
}