I don't know if this is possible or not with just javascript/jquery. I have a number of xml files that I usually read and disply with xpath, but the xml files are structured with HTML elements like this:
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<outcome>
<title>1.1</title>
<section>
<p>some text as an intro:
<ul>
<li>part of list</li>
<li>part of list</li>
</ul>
</p>
<p>more text</p>
</section>
</outcome>
<outcome>
<title>1.2</title>
<section>
<p>some text as an intro:
<ul>
<li>part of list</li>
<li>part of list</li>
</ul>
</p>
<p>more text</p>
</section>
</outcome>
</catalog>
I want to display all children and descendants of a select element. Using javascript, I know how to load the xml and select the element I need, and I know how to loop through nodes, but is it possible just to get a node and its descendants as a string? I could then just take the string and append a div like element.html("string"). I would let my css style the elements as needed. Is this possible with javascript? I know xsl could do this as a whole page, but I need just a small part of a large xml.