Browse Source

Use flash.FlashXml__, neko.NekoXml__, js.JsXml__ in init

Pascal Peridont 19 years ago
parent
commit
b053bac42d
1 changed files with 10 additions and 1 deletions
  1. 10 1
      std/Xml.hx

+ 10 - 1
std/Xml.hx

@@ -79,11 +79,20 @@ extern class Xml {
 	function toString() : String;
 	function toString() : String;
 
 
 	static function __init__() : Void untyped {
 	static function __init__() : Void untyped {
+		#if neko
+			untyped Xml = neko.NekoXml__;
+		#else js
+			untyped Xml = js.JsXml__;
+		#else flash
+			untyped Xml = flash.FlashXml__;
+		#else error
+		#end
+
 		Node = "node";
 		Node = "node";
 		PCData = "pcdata";
 		PCData = "pcdata";
 		CData = "cdata";
 		CData = "cdata";
 		Comment = "comment";
 		Comment = "comment";
-		Doctype = "doctype";
+		DocType = "doctype";
 		Prolog = "prolog";
 		Prolog = "prolog";
 		Document = "document";
 		Document = "document";
 	}
 	}