I have the following XML, for example:
<?xml version="1.0"?> <extraslist> <extra id="0" enabled="1" quantityavailable="2" displayindex="1"> <extraname>Example 1</extraname> <extradesc>Example 1 Description</extradesc> </extra> <extra id="1" enabled="1" displayindex="2"> <extraname>Example 2</extraname> <extradesc>Description 2</extradesc> </extra> </extraslist>
And the .find function, which finds every additional one and displays the result on a web page.
$(xmlExtras).find('extra').each(function(){ });
How would I start writing a function, so that if all the "extras" = enabled = "0" do something ...
source share