I'm attempting to use Notepad++ TextFX HTMLTidy -> Tidy: Reindent XML. This works well with the following exception. Lines longer than 70 character are wrapped, breaking the validity of my xml.


<RevieweeDepartmentName>BB AAAAAAAAAA AAAAAAAAAA AAAA</RevieweeDepartmentName>

Becomes this:

    <RevieweeDepartmentName>BB AAAAAAAAAA AAAAAAAAAA

How can I get it to stop this behavior?

3 Answers 3


In newer versions of Notepad++, you need to locate the TIDYCFG.INI file in C:\Program Files\Notepad++\plugins\Config\tidy

The INI file has a separate group for each entry on the Tidy menu. A group looks like this:

[TiDy clean Document - nowrap]

The text in brackets is the group name. This is the text that shows up in the HTML Tidy menu. The lines following are keys and values.

Locate [Tidy: Reindent XML] which is at the bottom of the file.

Add a new key of wrap: Set the value to either 0 (to turn of wrapping) or whatever line width you want. (I use 160.)

You can also move this group around in the file to re-order your menu. I put mine at the top to make it quicker to access.

So the top of my TIDYCFG.INI looks like this:

; quick reference: http://tidy.sourceforge.net/docs/quickref.html 
; cesky preklad:   http://www.pspad.com/cz/tidy.htm
; sample config file for HTML tidy from http://www.w3.org/People/Raggett/tidy/
[Tidy: Reindent XML]
input-xml: yes
wrap: 160

[Sample from Web Page]

If you're editing this file from inside of Notepad++, you need to remember save and close NP++, then re-open it for these changes to show up.


This isn't exactly a solution, but rather a work-around: I use SoapUI to format XML - it works great, and keeps the XML valid. Besides, it's possible that SoapUI may be useful for whaterver you'd like to do with the XML after you format it.


Edit the file HTMLTIDY.CFG and change the line:




You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .