I have a variable which contains some HTML. This HTML is not on the document body - only in the variable! From this, I want to extract the contents of each li and put it into an array, so that I can make something new with each list item.
Can I do something like this?
var myList = "<ul><li>item 1</li><li>item 2</li><li>item 3</li></ul>";
myList.getElementByTagName('LI') = myLiContents;
Thanks for looking!