I have web service which returns xml as plain string. I need to format it like xml beautifier does. I expect it to be performed on client side by JavaScript. How can I do that? What libraries is better fitted for this task?
Asked
Active
Viewed 2,922 times
1 Answers
0
One way of doing it is to use "JavaScript code prettifier" from Google.
You can find it here: http://google-code-prettify.googlecode.com/svn/trunk/README.html.
Follow the setup guide in the link and include the javascript file and then use it like so:
prettyPrintOne(XML_TO_BEAUTIFIED, 'xml')

Keith Enlow
- 914
- 6
- 17
-
Link is broke.. – user2796515 Sep 12 '19 at 12:44