Re: E4X
x.list.(function::hasOwnProperty("@id") && @id == "b");http://teramako.github.com/doc/modest-20100904/index.html#(10)
.(function::child("@id") == "b")
で良さそう。
さらにゴルフするなら .(*.parent().@id == "b")
とか。
xlist[i] = <span>hoge</span>;http://teramako.github.com/doc/modest-20100904/index.html#(18)
初耳。jsPerf で試したら確かに速い。
要素数以上の数字を指定すれば追加になる*1ので添え字を増やさずとも適当に大きい数((上限 4294967294 == -2 >>> 0
))でいい。