PDA

View Full Version : Displaying xml in extjs4 like we do when we display in browser



deepak.sharma
18 Apr 2012, 10:43 AM
Hi,
I want to display my xml in a separate window using extjs4 like we open manually by double clicking on xml file and display in internet explorer. I want to have it with +/- (expandable/collapsible) same as it is displayed in the inter web browser. But I want to see this functionality in some newly open window.

Please help me with initial code like how can I do it. I can pass on the xml as json object from the backend to Extjs4 UI.

scottmartin
18 Apr 2012, 9:02 PM
I believe the code folding is part of the browser. You would have to create this on your own.

You might be better off looking at:
http://market.sencha.com/addon/ext.ux.aceeditor.panel

that uses ACE Editor
http://ace.ajax.org/

There is an online demo that display XML using code folding:
http://ace.ajax.org/build/kitchen-sink.html

Regards,
Scott.