Feature Request - Pretty Print XML in network responses

579 views
Skip to first unread message

timki...@gmail.com

unread,
Oct 10, 2013, 4:21:00 PM10/10/13
to google-chrome-...@googlegroups.com

I'm working with a backend that returns XML and this is how the Preview AND Response tabs look for the network item. I would love to see the XML be pretty printed, at least in the Preview tab. I usually end up copying the XML and pasting into my editor and autoformatting it there.



PhistucK

unread,
Oct 10, 2013, 4:23:07 PM10/10/13
to Google Chrome Developer Tools
I like the idea.


PhistucK


On Thu, Oct 10, 2013 at 11:21 PM, <timki...@gmail.com> wrote:

I'm working with a backend that returns XML and this is how the Preview AND Response tabs look for the network item. I would love to see the XML be pretty printed, at least in the Preview tab. I usually end up copying the XML and pasting into my editor and autoformatting it there.



--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/50b476ad-b2fb-40c5-899a-fb5000ddb2d5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Andrey Sidorov

unread,
Oct 10, 2013, 5:41:52 PM10/10/13
to google-chrome-...@googlegroups.com, timki...@gmail.com
Would be even more useful to make last request/response objects available via command line api [1], for example $_1.request.header['Content-Type'], $_2.response.body etc
Same way as inspected DOM nodes are available as $1 .. $5


Andrey

johnj...@chromium.org

unread,
Oct 15, 2013, 3:10:48 PM10/15/13
to google-chrome-...@googlegroups.com, timki...@gmail.com
Hi Tim ;-)

I think you could accomplish this with chrome devtools extensions.

In your devtools extension JS file, 
add a listener for request finish:
The result is a JSON object in HAR format:
If you see XML you can get the content
pass it through one of the javascript XML beautifiers, and put the output in a panel:

You can also open a feature request on crbug.com and ask other folks using XML to star the request to encourage its development.

jjb

Tim Kindberg

unread,
Oct 15, 2013, 3:25:30 PM10/15/13
to johnj...@chromium.org, google-chrome-...@googlegroups.com
Very cool thanks!
--
Thanks,

Tim Kindberg
Reply all
Reply to author
Forward
0 new messages