Is this what you are looking for? Click here (jsFiddle link)
In this code, you will need to get the XML and save it in a variable first, like me. The code may not be exactly what you are looking for, but it can be a good starting point. Play with the code and let me know if this is what you are looking for or not.
You can also try this (same code as jsFiddle link, but just using warnings instead of adding data to the DOM)
var xml = "<Test><Unit><Title>Test 1</Title><Date>01/07/2011</Date><Content format='html'>some content here</Content></Unit><Unit><Title>Testing New XML</Title><Date>27/06/2011</Date><Content format='html'>some more content here</Content></Unit></Test>"; $(xml).find("Unit").each(function(){ if($(this).find("Title").length > 0){ var unitData = $(this).text(); alert(unitData); } });
This should give you two warnings.
source share