if li have no left child then its append on div tag when click on it
<p>this is my xml file:-</p>

<pre><code>&lt;root&gt;
  &lt;child_1 entity_id = "1" value="Game" parent_id="0"&gt;
    &lt;child_2 entity_id="2" value="Activities" parent_id="1"&gt;
      &lt;child_3 entity_id="3" value="Physical1" parent_id="2"&gt;
        &lt;child_6 entity_id="6" value="Cricket" parent_id="3"&gt;
          &lt;child_7 entity_id="7" value="One Day" parent_id="6"/&gt;
        &lt;/child_6&gt;
      &lt;/child_3&gt;
      &lt;child_4 entity_id="4" value="Test1" parent_id="1"&gt;
        &lt;child_8 entity_id="8" value="Test At Abc" parent_id="4"/&gt;
      &lt;/child_4&gt;
      &lt;child_5 entity_id="5" value="Test2" parent_id="1"&gt;
        &lt;child_9 entity_id="9" value="Test At Xyz" parent_id="5"/&gt;
      &lt;/child_5&gt;
    &lt;/child_2&gt;
&lt;/child_1&gt;
&lt;/root&gt;
</code></pre>

<p>this is my xslt to find All Activities from the xml file and set there attribute value into <code>ul li</code> <br>
now i want to set on them if leaf <code>li</code> then click on it and  it append in my <code>&lt;div id="result"&gt;&lt;/div&gt;</code>  <br></p>

<p>i am try this.<br></p>

<pre><code>&lt;head&gt;
    &lt;link rel="stylesheet" href="a.css"&gt;&lt;/link&gt;
&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"&gt;&lt;/script&gt;
    &lt;title&gt;Untitled Page&lt;/title&gt;
    &lt;script&gt;
        var xml = loadXMLDoc("abc.xml");
        var xsl = loadXMLDoc("a.xsl");



        function loadXMLDocOther(location) {
            xhttp = new XMLHttpRequest();
            xhttp.open("GET", location, false);
            xhttp.send("");
            return xhttp.responseXML;
        }

        function loadXMLDoc(dname) {
            if (window.ActiveXObject) {
                return loadXMLDocActiveX(dname);
            }
            else if (window.XMLHttpRequest) {
                return loadXMLDocOther(dname);
            }
        }        
        function transformOther(xml, xsl, target, selected) {
            var xsltProcessor = new XSLTProcessor();
            xsltProcessor.importStylesheet(xsl);

            if (selected) {
                xsltProcessor.setParameter(null, "selected", selected);
            }

            var resultDocument = xsltProcessor.transformToFragment(xml, document);
            target.innerHTML = "";
            target.appendChild(resultDocument);
        }

        function displayResult() {
            var targetElement = document.getElementById("load");

            // code for IE
            if (window.ActiveXObject) {
                transformActiveX(xml, xsl, targetElement);
            }
            // code for Mozilla, Firefox, Opera, etc.
            else if (document.implementation &amp;&amp; 
                     document.implementation.createDocument) {
                transformOther(xml, xsl, targetElement);
            }
        }
           $('li:not(:has(*))').click(function(){
           $('#result').text($(this).text());
           });
    &lt;/script&gt;
&lt;/head&gt;
&lt;body onload="displayResult()"&gt;
    &lt;div id="load"&gt;
    &lt;/div&gt;
    &lt;div id="result"&gt;result&lt;/div&gt;
&lt;/body&gt;
</code></pre>

<p>i am try above all code but its not work.<br>
help me out with this.<br>
thanks.</p>
