Comment.length as Number
This is inherited from the CharacterData object.
The length of the character data (codepoints).cts.doc("example.xml").root.firstChild.length
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.