Look at the SaveOptions class. I think you create one, and then tell it
to "preserve whitespace" or somesuch. That means "no formatting".
Inserting spaces then takes place only where there is not source text as
the source of the model (i.e, when there are semantic changes that are
not (yet) reflected in text.
Hope that helps.
On 2013-18-01 16:01, Marco Naddeo wrote:
> Hi all
> I'd like to call the serializer preserving the original formatting,
> while when I call it, the format of the resulting textual representation
> is determined by the Formatter.
> Is it possible in some way to preserve original formatting?
> I read in the documentation that SaveOptions can be passed to the
> serializer to disable the formatter:
>> If disabled, the formatter only defines white space information for
>> the places in which no white space information can be preserved from
>> the node model.
> but I cannot understand how. :( [And I do not know if this affects what
> I want. :?]
> Could you please help me? :roll: