I'm trying to add an li to a ul using jquery and can't get it to work. I am using the following code.
I have read an XML file which is in the following format for example,
<Products>
<Description>Pound</Description>
<ProductType>CUR</ProductType>
<CurrencyCode>GBP</CurrencyCode>
<Rate>1</Rate></ProductRate>
<Description>Euro</Description>
<ProductType>CUR</ProductType>
<CurrencyCode>Eur</CurrencyCode>
<Rate>1.5</Rate></ProductRate>
</Products>
I am trying to use jquery to create a list of the products but it keeps adding them as 1 li element and not multiple li's where list is the actual list,
I am using the following jquery
var $xml = $(xml);
var $list = $('#list');
$description = $xml.find("Description");
$( "#list" ).append($description.text());`
This reads the elements but adds them as a single li element
<ul>
<li>
Pound GBP Euro Eur
</li>
</ul>
I have also tried
$( "#list" ).append("<li>"+$description.text()+"</li>");
but this still delivers the same html. So my question is how do I ensure they are shown as separate li elements?