Because empty strings use memory.
> On Nov 12, 2021, at 8:19 PM, Edward Stangler <estang...@bradmark.com> wrote:
>
>
> Why is XML.copy() not setting ""?
>
>
> On 11/12/2021 4:05 AM, Harbs wrote:
>> xml.toXMLString() is correct.
>>
>> <foo baz="”/>
>>
>> after:
>> xml2 = data.copy();
>>
>> <foo baz="null”/>
>>
>> I believe there’s two problems:
>>
>> 1. XML.toString() blindly returns _value for attributes even though they can
>> be undefined. Leaving them undefined saves memory.
>> 2. XML.escapeAttributeValue uses String(value) which can result in
>> “undefined”.
>>
>