Tree Style XML Viewer & Formatter Example

Simple Use-case - text

Input

var xml = "<description><of>Hello</of><og /><blob> </blob><!--  Comment here --><![CDATA[sdfsdf]]><childNode><bob>fd<bob2></bob2><bob21 /></bob></childNode><!--Second Comment--></description>";
$("#simpleUseCase").empty().simpleXML({ xmlString: xml });
Output

Test