[jQuery] Traverse XML string

[jQuery] Traverse XML string


Hi,
I want to read the values from a simple xml string but can't get it to
work. Here's the code:
var xml = "<food><burger>cheese</burger></food>";
// example 1
var result = $(xml).find("food").find("burger").text();
// example 2
$("food", xml).each(function(i)
{
result = $(this).find("burger").text();
});
in both examples result is empty.
I tested that jquery is working by setting the body backgroud color.
Regards,
FatSlags2004