On Wed, Oct 28, 2015 at 10:32 AM, Mattias Gaertner
wrote:
> On Wed, 28 Oct 2015 09:43:23 -0200
> Marcos Douglas wrote:
>
>> [...]
>> ...automatically, by set a property or use a method.
>> Is it possible?
>
> You have to define what to do with text
On Wed, 28 Oct 2015 10:57:35 -0200
Marcos Douglas wrote:
>[...]
> You suggest use fpc xml writer to:
> 1- load the original XML without spaces
> 2- save the XML after with automatically spaces
>
> Like that?
Yes.
> I don't know the fpc xml write yet, so I'm asking how use
On Wed, 28 Oct 2015 09:43:23 -0200
Marcos Douglas wrote:
> On Wed, Oct 28, 2015 at 6:48 AM, Mattias Gaertner
> wrote:
> > On Wed, 28 Oct 2015 01:17:23 -0200
> > Marcos Douglas wrote:
> >
> >> Hi,
> >>
> >> I'm using TSynMemo and
On Wed, Oct 28, 2015 at 6:48 AM, Mattias Gaertner
wrote:
> On Wed, 28 Oct 2015 01:17:23 -0200
> Marcos Douglas wrote:
>
>> Hi,
>>
>> I'm using TSynMemo and TSynXMLSyn.
>> How format a XML after load it?
>
> Please define "format".
Ok, sorry.
I meant
uses
Codebot.Text.Xml;
function PrettyXml(const Xml: string): string;
var
D: IDocument;
begin
D := DocumentCreate;
D.Xml := Xml;
D.Beautify;
Result := D.Xml;
end;
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
Memo1.Text := PrettyXml(Memo1.Text);
end;
Result:
On Wed, Oct 28, 2015 at 12:37 PM, Anthony Walter wrote:
> uses
> Codebot.Text.Xml;
>
> function PrettyXml(const Xml: string): string;
> [...]
Thank you!
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
Marcos, here are a few notes when working with Codebot.Text.Xml:
* You can use IDocument.Load/Save to load and save Xml to and from files.
* If the Xml text is in an invalid state, the IDocument will be empty.
* Attempts to read an empty IDocument Text or Xml property return an
empty Xml
On Wed, 28 Oct 2015 01:17:23 -0200
Marcos Douglas wrote:
> Hi,
>
> I'm using TSynMemo and TSynXMLSyn.
> How format a XML after load it?
Please define "format".
Mattias
--
___
Lazarus mailing list
Hi,
I'm using TSynMemo and TSynXMLSyn.
How format a XML after load it?
Thanks,
Marcos Douglas
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus