Parsing an XML Like String in Javascript / Jquery

I’m trying to learn the basics of XML parsing, I know how to get data from a SQL database but I can’t get the JQuery XML Parsing to work properly.

This is the basic thing i’m trying:

var xml = '<url>urlofpage1</url><notes>These notes should load!</notes>';
var $xml = $(xml);

var $notes = $xml.find('url')
                 .filter(function() { return $(this).text() == 'urlofpage1' })
                 .closest('notes');

console.log('$notes: ', $notes); 

It either returns null or [object Object]

I’m trying to select the note closest to the <url> tag which contains urlofpage1

What am I Doing wrong?

Thanks for any help

Any ideas?