views:

871

answers:

7

Hi Anyone know of a simple system of getting xml formatted inside an editor. I mainly use textpad so that would be my main interest. What I'm really asking is that when I paste an xml string from a logfile or something into textpad that I can use a plugin or a third party tool to format the xml in textpad so it is readable.

Edit: Thanks for all the suggestions, but I think what I'm really looking for is a way of formatting a string of text I just paste into the editor and then (without saving the document) get it to be formatted as an xml string eg. indentation.

Any suggestions?

Update: I found that Editpad pro allows you to write tools that will take the current selected text as input and replace it with the output. This is more powerful than what textpad allows you to do and just what I want.

A: 

Notepad2 will be useful here. You can use it for editing and highlighting XML, HTML, Javascript and many other languages. Check it here:

http://www.flos-freeware.ch/notepad2.html

mnour
+1  A: 

You can use Visual Studio to format XML.

Just create a new XML file and paste your text...done.

Steve Horn
+1  A: 

HTML Tidy would be the most basic solution. It can do indention of XML on the command line, maybe your favorite editor can execute external commands so you can make a menu entry for this.

EDIT: A quick look into Google reveals that you can actually make custom commands for TextPad.

Tomalak
A: 

There are add-ons for textpad that do it. Look at TextPad Syntax Definition Files or TextPad add-ons: utilities.

Cheers, Leonel

Leonel Martins
+2  A: 

I like Microsoft's free XML Notepad for editing (or formatting) XML. It's a free download from their website, but it requires the .NET runtime.

bart
A: 

eclipse has a nice formatter for XML

Inside any XML file just type

CTRL Shift f

Paul Whelan
A: 

http://www.textpad.com/add-ons/index.html downlaod XMLTIDY and follow the instructions.