TXFANode.AddComment Method

function AddComment(const AValue: AnsiString): TXFANode;

Appends an owned #text node with XMLContentKind=xckComment and hands back that child; AValue is the literal UTF-8 payload between the comment delimiters

Entity-looking strings stay literal and comments leave the parent's aggregate Value unchanged

Invalid XML characters, two consecutive hyphens or a trailing hyphen raise EHPDFXFAError before any child is published

The parent owns the returned node; do not free it separately whilst it remains in Children

TXFANode and Native XML Content