[Lazarus] TSynMemo + TSynXMLSyn: How format a XML after load it?
Marcos Douglas
md at delfire.net
Wed Oct 28 13:57:35 CET 2015
On Wed, Oct 28, 2015 at 10:32 AM, Mattias Gaertner
<nc-gaertnma at netcologne.de> wrote:
> On Wed, 28 Oct 2015 09:43:23 -0200
> Marcos Douglas <md at delfire.net> wrote:
>
>> [...]
>> ...automatically, by set a property or use a method.
>> Is it possible?
>
> You have to define what to do with text elements containing only
> space (e.g. <element> </element>). By default it should keep the
> spaces (Note: spaces include tabs and line breaks).
The original XML comes from a WebService and not contains spaces.
Part of my program is exhibit this XML to user to him check erros,
send for other person, log, etc.
Would be better show these XML with indentation.
> Further complications: CDATA.
>
> The current fpc xml writer creates the indentation, but messes up text
> element.
> The laz2_xml writer has a flag to keep the indentation and
> preserving text elements. This could be extended with a further flag to
> indent elements gaps while preserving text elements.
You suggest use fpc xml writer to:
1- load the original XML without spaces
2- save the XML after with automatically spaces
Like that?
I don't know the fpc xml write yet, so I'm asking how use it.
>
> Or you can simply write a function that works for your xml files.
Not simple to do that. The program don't know nothing about the XML
before call them, because there is many WebServices. The program is
just a tool for "debbuger" informations.
Marcos Douglas
More information about the Lazarus
mailing list