IntelliJ IDEA is overall a good IDE, it's available on Mac, and it supports editing XML in ways such as syntax highlighting, collapsing a given scope, and validating XML. I haven't used it much for XML, but I've had good experiences with that IDE for other purposes so thought I would mention it here. Need a tool that can format the xml in human readable format on Mac!
Need a tool that can format the xml in human readable format on Mac!
javannaclosed as not constructive by Bill the LizardDec 16 '12 at 15:46
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. If this question can be reworded to fit the rules in the help center, please edit the question.
3 Answers
I suggest you install XMLLint which the best solution to view pretty formatted XML (included in LibXML package.
I use TextWrangler (free) together with a text filter which uses xmllint. Download it here: http://www.barebones.com/products/textwrangler/download.html
After you have it, create a new file and save it with a name like tidy.sh under ~/Library/Application Support/TextWrangler/Text Filters
. Write the following in the file and save it:
The above should also work for BBEdit 11. For versions of TextWrangler < 4.0 or BBEdit < 11, this script should be slightly different:
Then you'll be able to apply this from the Text menu > Apply Text Filter > tidyTo make it even easier, you can bind a shortcut to this.Go to Window > Palettes > Text Filters. You will see your tidy filter there. Select and hit 'Set Key...' and choose a combination that suits you (I use alt+cmd+x).
Just started today to use Serna: http://www.serna-xmleditor.com