You are here: PSPad forum > English discussion forum > Re: Formatting XML code
Posted by: aderda | Date: 04/16/2012 09:05 | IP: IP Logged
Hi,
I use "Reformat HTML code" feature in order to format XML code. It works perfectly fine, as long as the XML file is without comments. Adding a comment breaks the indentation. The problem does not occur, if you add a comment to an HTML file. Now the question is, if it's a bug. I'm not sure if formatting is supposed to work only for HTML, but I think it should work for XML as well.
Best regards,
Adam
Edited 1 time(s). Last edit at 04/16/2012 09:05 by aderda.
Posted by: pspad | Date: 04/16/2012 09:14 | IP: IP Logged
Does your file is higlighted with XML higlighter?
Do you use the current PSPad version?
Posted by: aderda | Date: 04/17/2012 15:56 | IP: IP Logged
Hi,
Yes, I use the latest stable version (4.5.6) and yes, I use XML highlighter. To see an example, please try to format the following piece of XML:
<?xml version="1.0" encoding="windows-1250"?>
<a>
<b>
<!-- comment -->
</b>
</a>
Edited 1 time(s). Last edit at 04/17/2012 15:57 by aderda.
Posted by: ino | Date: 04/18/2012 15:01 | IP: IP Logged
Hi,
I just can confirm wrong formating in latest version PSPad 4.5.7(2445)
This piece of code:
<?xml version="1.0" encoding="windows-1250"?>
<a>
<b>
<!-- comment -->
</b>
</a>
was formatted to this one:
<?xml version="1.0" encoding="windows-1250"?>
<a>
..<b>
....<!-- comment --></b>
..</a>
(I used dots instead of spaces)
Posted by: pspad | Date: 04/26/2012 10:56 | IP: IP Logged
Fix will be available in the next build
Editor PSPad - freeware editor, © 2001 - 2013 Jan Fiala
Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák