LexicalPreservationConfig PreserveEntityReferences Property XML Compare .NET API Documentation
XML Compare .NET API Documentation - DEPRECATED
Controls whether markup is used to record where entity references were used.

Namespace: DeltaXML.CoreS9Api.Config
Assembly: DeltaXML.CoreS9Api (in DeltaXML.CoreS9Api.dll) Version: 10.4.0.1000 (10.4.0.1000)
Syntax

public bool PreserveEntityReferences { get; set; }

Property Value

Type: Boolean
Remarks

Controls whether markup is used to record where entity references were used.

An XML start-tag and end-tag will usually mark the position of the entity reference. This marker element will contain, by default, the entity replacement text as it was expanded by the parser.

Here is an example showing use of the XML predefined ampersand entity, more complex entities are also supported, including longer sequences of text and markup (elements):

<para>Hide &amp; seek</para>

When this method is configured to false, the output will be:

<para>Hide & seek</para>

The parser converts the entity into a literal unicode character (which may be serialized back into an entity at the end of the pipeline). With the setting true we see an XML element (using the 'er' namespace and local-name from the entity name) which records the details of the entity reference:

<para>Hide <er:amp>&</er:amp> seek</para>

Please see the description of PreserveEntityReplacementText for a more detailed description of how these two settings interact.

See Also