I have this code in a Javascript function that reads an XML file:
var title = $(this).children('Title').text();
This works for this XML code
<Title>
Nice long title
</Title>
In the same XML file I have information nested within the brackets like this:
<ProductSearch>
<Products totalResultsAvailable="0" firstResultPosition="1" totalResultsReturned="0" searchOperator="or"/>
</ProductSearch>
What code do I require to extract the totalResultsAvailable integer? Thanks in advance.
1 Answer