tidy -xml changes empty elements to non-empty elements

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 UTC