Suresh_9 0 Newbie Poster

[

$("#flowchart22").click(function() {
    var xml = "\n";
    $("li").each(function() {
        var cells = $("li", this);
        if (cells.length > 0) {
            xml += "\n";
            for (var i = 0; i < cells.length; ++i) {
                xml += "\t<" + cells.eq(i).text() + ">   </" + cells.eq(i).text() + ">\n";
            }
            xml += "\n";
        }
    });
    window.alert("<answer>\t"+xml+"</answer>");
});

});


//I have a code Like Tree Format, I wrote that code using HTML UL LI.I want to convert that HTML UL LI Nested List to XML File.
 Im using Above code for XML conversion from HTML UL LI. I have not get Proper tree formation. So, kindly Help me anyone.. 

]none

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.