I've got XML like this:
<REQUEST>
<GET_IMAGE>
<PROPERTIES>
<LAYERLIST>
</LAYERLIST>
</PROPERTIES>
</GET_IMAGE>
</REQUEST>
and I wanna to add to node LAYERLIST few other child nodes like this:
<LAYER id="1"/>
<LAYER id="2"/>
.
.
.
I'm trying to do this by
$(xml).find('LAYERLIST').get(0).append(nodes)
and when I'm doin just $(xml).find('LAYERLIST').get(0) I can get to this node, but when I'm doing $(xml).find('LAYERLIST').get(0).append(nodes) I get 'append is not a function'. I tried with appentTo to and effect were pretty much same.
.get()returns a DOM element, not a jQuery object: api.jquery.com/get. Just remove it or useappendChild(that of course also depends on whatnodesis) or use.eqinstead: api.jquery.com/eq