When appending nodes to previous sibling's parent, comment nodes must be excluded from processing. Best Regards Winfried