W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2003

tidy -xml changes empty elements to non-empty elements

From: Mickey and Amy Glasgow <lglasgow@triad.rr.com>
Date: Wed, 19 Feb 2003 19:20:41 -0500
Message-ID: <000901c2d875$e6ec1500$9865fea9@Dell>
To: <html-tidy@w3.org>

For example, the following input:

<HomeAddress>
  <AddressLine1>13 Mockingbird Ln</AddressLine1>
  <AddressLine2></AddressLine2>
</HomeAddress>

...in which AddressLine2 is an empty element becomes:

<HomeAddress>
  <AddressLine1>13 Mockingbird Ln</AddressLine1>

  <AddressLine2>
  </AddressLine2>
</HomeAddress>

...in which the element value for the AddressLine2 tag now contains a
newline character and two spaces.

An XML processor will treat these two values differently!!!

I don't really like the blank line between the two inner elements, but at
least it doesn't change the content of the data.

Thanks,
Mickey Glasgow
mickey_glasgow@aoncons.com
Received on Wednesday, 19 February 2003 20:27:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:53 GMT