Hello guys,
I have the following XML-
<rows>
<row id="5">
<cell>Item1</cell>
<attrs>
<attr>
<id>1</id>
<type>CheckBox</type>
<values>
<value>
<id>10</id>
</value>
<value>
<id>11</id>
</value>
</values>
</attr>
<attr>
<id>2</id>
<type>CheckBox</type>
<values>
<value>
<id>20</id>
</value>
<value>
<id>21</id>
</value>
</values>
</attr>
</attrs>
</row>
</rows>
What I want to do is to loop each of the of a certain row.
I tried to do this in order to get all of the attr ids but I also got the values ids.
function fillForm(id){
var theRow = $(theXmlDoc).find('row[id='+id+']').get()
$(theRow).find("attr").each(function(i)
{
alert($(this).find("id").text());
});
}
I also would like to note that main goal is loop each attr and afterwards to loop each value while I have the attr's id.
P.S if you think of an easier/simpler way to do so with some other library I'm open for suggestions.
Thanks in advance,