Proxy

class haxe.xml.Proxy<Const, T>Available in flash, flash9, neko, js, phpThis proxy can be inherited with an XML file name parameter. It will only allow access to fields which corresponds to an "id" attribute value in the XML file :
class MyXml extends haxe.xml.Proxy<"my.xml", MyStructure> { }

/* ... */

// ... fill h with "my.xml" content
var h = new Hash<MyStructure>();
var m = new MyXml(h.get); 

// access to "myNode" is only possible if you have 
// an id="myNode" attribute in your XML, and completion works as well
trace(m.myNode.structField);
function new( f : String -> T ) : Void function resolve( k : String ) : T
version #2269, modified 2008-07-28 10:00:47 by api