I've got an XML document that contains a tag that has well-formed HTML content. I need to get that HTML into my page using JavaScript. However, due to CMS issues, the HTML CANNOT be escaped with < ![CDATA[ ]]> or anything else, and the <> must be present, not encoded to < ; > ;
<submenu>
<content>
<div>
<h3>Hello World</h3>
<p>Lorem <a href="ipsum.html">ipsum</a></p>
</div>
</content>
</submenu>
I've used jQuery to get the XML and put the submenu's into an array. I'm able to get the text with:
$(menuArray[n]).find('content').text();
However, this just returns "Hello World Lorem ipsum". I need the HTML. Unfortunately jQuerys' .html() method doesn't work with XML.
Is there any other way? Thanks in advance.