XML configuration files beautified

Discussion Forums discussion XML configuration files beautified

This topic contains 0 voices and has 3 replies.

Viewing 4 posts - 1 through 4 (of 4 total)
Author Posts
Author Posts
November 2, 2010 at 1:36 pm #5117

Nux
Member

Hi.

Is it possible to setup PN so that it saves all (or most) of it’s configuration files in a beautified version (or at least with line breaks).

The point is to allow users to edit files by hand and use diff tools for project configuration files (both for things like CVS/SVN and synchronising user settings between computers).

If it’s not implemented would you say it would be hard or easy to implement?

November 10, 2010 at 4:36 pm #17411

simon
Key Master

Currently GenX the tool we use for writing the XML does not support beautified writing (it’s designed to output canonical XML). It’s something I’d be willing to accept a patch for, but won’t have time to work on any time soon.

It may not be that difficult to do, as it should be a case of finding where end element writing is handled in genx.c and add indent/line breaks. Care would need to be taken over indents where the inner content of an element is text – changing the output to use indent or line break there would change the content of the file.

December 26, 2010 at 10:43 pm #17412

Nux
Member

Hi!

Added an issue here with a proposed patch:

https://code.google.com/p/pnotepad/issues/detail?id=1146

Note that I’ve only tested the code on Visual C++ Express 2008 as a separate test project. I was not sure if I would be able to compile PN at all on an Express edition…

January 4, 2011 at 2:52 pm #17413

simon
Key Master

Thanks Nux, I’ll take a look. People have managed to get all of PN building with express, it’s a bit fiddly. Have a search on here and you should turn up some instructions.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.