|
@@ -60,7 +60,7 @@ enum XmlType {
|
|
|
cur : x,
|
|
|
xml : function(name,att) {
|
|
|
var x : Dynamic = new Xml();
|
|
|
- x._parent = untyped this.cur;
|
|
|
+ x._parent = untyped __this__.cur;
|
|
|
x.nodeType = Xml.Element;
|
|
|
x._nodeName = new String(name);
|
|
|
x._attributes = att;
|
|
@@ -73,27 +73,27 @@ enum XmlType {
|
|
|
__dollar__objset(att,f[i], new String(__dollar__objget(att,f[i]))) ;
|
|
|
i++;
|
|
|
}
|
|
|
- this.cur.addChild(x);
|
|
|
- this.cur = x;
|
|
|
+ __this__.cur.addChild(x);
|
|
|
+ __this__.cur = x;
|
|
|
}
|
|
|
},
|
|
|
cdata : function(text) {
|
|
|
var x : Dynamic = new Xml();
|
|
|
- x._parent = untyped this.cur;
|
|
|
+ x._parent = untyped __this__.cur;
|
|
|
x.nodeType = Xml.CData;
|
|
|
x._nodeValue = new String(text);
|
|
|
- untyped this.cur.addChild(x);
|
|
|
+ untyped __this__.cur.addChild(x);
|
|
|
},
|
|
|
pcdata : function(text) {
|
|
|
var x : Dynamic = new Xml();
|
|
|
- x._parent = untyped this.cur;
|
|
|
+ x._parent = untyped __this__.cur;
|
|
|
x.nodeType = Xml.PCData;
|
|
|
x._nodeValue = new String(text);
|
|
|
- untyped this.cur.addChild(x);
|
|
|
+ untyped __this__.cur.addChild(x);
|
|
|
},
|
|
|
comment : function(text) {
|
|
|
var x : Dynamic = new Xml();
|
|
|
- x._parent = untyped this.cur;
|
|
|
+ x._parent = untyped __this__.cur;
|
|
|
if( untyped __dollar__sget(text,0) == 63 ) {
|
|
|
x.nodeType = Xml.Prolog;
|
|
|
text = new String(text);
|
|
@@ -103,17 +103,17 @@ enum XmlType {
|
|
|
text = new String(text);
|
|
|
}
|
|
|
x._nodeValue = text;
|
|
|
- untyped this.cur.addChild(x);
|
|
|
+ untyped __this__.cur.addChild(x);
|
|
|
},
|
|
|
doctype : function(text) {
|
|
|
var x : Dynamic = new Xml();
|
|
|
- x._parent = untyped this.cur;
|
|
|
+ x._parent = untyped __this__.cur;
|
|
|
x.nodeType = Xml.DocType;
|
|
|
x._nodeValue = new String(text).substr(1);
|
|
|
- untyped this.cur.addChild(x);
|
|
|
+ untyped __this__.cur.addChild(x);
|
|
|
},
|
|
|
done : function() {
|
|
|
- untyped this.cur = this.cur._parent;
|
|
|
+ untyped __this__.cur = __this__.cur._parent;
|
|
|
}
|
|
|
};
|
|
|
untyped _parse(str.__s,parser);
|
|
@@ -238,10 +238,10 @@ enum XmlType {
|
|
|
cur: 0,
|
|
|
x: this._children,
|
|
|
hasNext : function(){
|
|
|
- return this.cur < this.x.length;
|
|
|
+ return __this__.cur < __this__.x.length;
|
|
|
},
|
|
|
next : function(){
|
|
|
- return this.x[this.cur++];
|
|
|
+ return __this__.x[__this__.cur++];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -254,24 +254,24 @@ enum XmlType {
|
|
|
cur: 0,
|
|
|
x: this._children,
|
|
|
hasNext : function() {
|
|
|
- var k = this.cur;
|
|
|
- var l = this.x.length;
|
|
|
+ var k = __this__.cur;
|
|
|
+ var l = __this__.x.length;
|
|
|
while( k < l ) {
|
|
|
- if( this.x[k].nodeType == Xml.Element )
|
|
|
+ if( __this__.x[k].nodeType == Xml.Element )
|
|
|
break;
|
|
|
k += 1;
|
|
|
}
|
|
|
- this.cur = k;
|
|
|
+ __this__.cur = k;
|
|
|
return k < l;
|
|
|
},
|
|
|
next : function() {
|
|
|
- var k = this.cur;
|
|
|
- var l = this.x.length;
|
|
|
+ var k = __this__.cur;
|
|
|
+ var l = __this__.x.length;
|
|
|
while( k < l ) {
|
|
|
- var n = this.x[k];
|
|
|
+ var n = __this__.x[k];
|
|
|
k += 1;
|
|
|
if( n.nodeType == Xml.Element ) {
|
|
|
- this.cur = k;
|
|
|
+ __this__.cur = k;
|
|
|
return n;
|
|
|
}
|
|
|
}
|
|
@@ -287,25 +287,25 @@ enum XmlType {
|
|
|
cur: 0,
|
|
|
x: this._children,
|
|
|
hasNext : function() {
|
|
|
- var k = this.cur;
|
|
|
- var l = this.x.length;
|
|
|
+ var k = __this__.cur;
|
|
|
+ var l = __this__.x.length;
|
|
|
while( k < l ) {
|
|
|
- var n = this.x[k];
|
|
|
+ var n = __this__.x[k];
|
|
|
if( n.nodeType == Xml.Element && n._nodeName == name )
|
|
|
break;
|
|
|
k++;
|
|
|
}
|
|
|
- this.cur = k;
|
|
|
+ __this__.cur = k;
|
|
|
return k < l;
|
|
|
},
|
|
|
next : function() {
|
|
|
- var k = this.cur;
|
|
|
- var l = this.x.length;
|
|
|
+ var k = __this__.cur;
|
|
|
+ var l = __this__.x.length;
|
|
|
while( k < l ) {
|
|
|
- var n = this.x[k];
|
|
|
+ var n = __this__.x[k];
|
|
|
k++;
|
|
|
if( n.nodeType == Xml.Element && n._nodeName == name ) {
|
|
|
- this.cur = k;
|
|
|
+ __this__.cur = k;
|
|
|
return n;
|
|
|
}
|
|
|
}
|