Closed stevenvachon closed 10 years ago
It's ok ;)
xml.$('data') // => NodeSet[ <data> ]
xml.$('data/*') // => NodeSet[ ..children of the <data> ..]
xml.$('data/*').$('number/text()') // done
NodeSet.$/find
start walking from current NodeSet members, not childs, and produce NodeSet of the found nodes.
to get data
tag, not the NodeSet of the data
tag:
xml.$('data').eq(0).$('number/text()') // same as $('data/*').$('number/text()')
Finally, remember: NodeSet#find
always return a NodeSet.