xmldom icon indicating copy to clipboard operation
xmldom copied to clipboard

normalize() should drop empty text nodes

Open marrus-sh opened this issue 2 years ago • 1 comments

DOM Level 2 states :—

Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes.

https://www.w3.org/TR/DOM-Level-2-Core/#core-ID-normalize

Right now in xmldom, empty text nodes are not removed.

marrus-sh avatar May 11 '22 01:05 marrus-sh

Thx for pointing it out. I think it should not be to tricky to implement, including tests.

karfau avatar May 11 '22 16:05 karfau