Re: [xml-dev] Text editor mirage

From
Mukul Gandhi <>
To
Roger L Costello <>
Date
2021-12-14T04:13:24Z
ID
<CANGHzgC0Km_EWNa-U7=>
Thread
Re: [xml-dev] Text editor mirage
On Mon, Dec 13, 2021 at 6:04 PM Roger L Costello <[email protected]> wrote:

[Definition] Mirage: something that appears real or possible but is not in fact so.

Hi Folks,

Recently I used a text editor to open an XML document. Here’s what I saw:

<Document>

    <Greeting>Hello, world</Greeting>

</Document>

That is, at the top of the screen I saw:

<Document>

About a centimeter below I saw:

    <Greeting>Hello, world</Greeting>

And a centimeter below that I saw:

</Document>

It is a mirage.

There is no vertical dimension in the XML. The XML is just a linear list of symbols:

<Document>NL    <Greeting>Hello, world</Greeting>NL</Document>

The invisible characters I denote by NL.


The mirage effect that, you've cited is due to the fundamental difference between physical XML characters and the UI editor rendering software. Within an XML document, a newline or an end-of-line character are physical characters (bytes).The UI editor rendering software, displays (i.e, appears to the eyes) the newline/end-of-line characters as invisible (i.e whitespaces).
 
What is physically, a software characteristic, you call a mirage :)


--
Regards,
Mukul Gandhi