|
@@ -26,18 +26,17 @@ package haxe.xml;
|
|
It will only allow access to fields which corresponds to an "id" attribute
|
|
It will only allow access to fields which corresponds to an "id" attribute
|
|
value in the XML file :
|
|
value in the XML file :
|
|
|
|
|
|
- [
|
|
|
|
- class MyXml extends haxe.xml.Proxy<"my.xml",MyStructure> {
|
|
|
|
|
|
+ ```haxe
|
|
|
|
+ class MyXml extends haxe.xml.Proxy<"my.xml", MyStructure> {
|
|
}
|
|
}
|
|
- ...
|
|
|
|
|
|
+
|
|
var h = new haxe.ds.StringMap<MyStructure>();
|
|
var h = new haxe.ds.StringMap<MyStructure>();
|
|
// ... fill h with "my.xml" content
|
|
// ... fill h with "my.xml" content
|
|
var m = new MyXml(h.get);
|
|
var m = new MyXml(h.get);
|
|
trace(m.myNode.structField);
|
|
trace(m.myNode.structField);
|
|
- // access to "myNode" is only possible
|
|
|
|
- // if you have an id="myNode" attribute
|
|
|
|
- // in your XML, and completion works as well
|
|
|
|
- ]
|
|
|
|
|
|
+ // Access to "myNode" is only possible if you have an id="myNode" attribute
|
|
|
|
+ // in your XML, and completion works as well.
|
|
|
|
+ ```
|
|
**/
|
|
**/
|
|
class Proxy<Const,T> {
|
|
class Proxy<Const,T> {
|
|
|
|
|