The XMLNSC parser discards comments and processing instructions because both comments and processing instructions are auxiliary information with no business meaning.
Comments can be preserved if you select the Retain comments check box on the Parser Options page of the node properties.
DECLARE X BLOB;
-- assume that X contains an XML document
CREATE LASTCHILD OF OutputRoot.XMLNSC
PARSE(X DOMAIN XMLNSC
NAME preserveComments
OPTIONS XMLNSC.CommentsRetainAll);
-- do it again, this time discarding comments
CREATE LASTCHILD OF OutputRoot.XMLNSC
PARSE(X DOMAIN XMLNSC
NAME discardComments
OPTIONS XMLNSC.CommentsRetainNone);
Processing instructions can be preserved if you select the Retain processing instructions check box on the Parser Options page of the node properties.
DECLARE X BLOB;
-- assume that X contains an XML document
CREATE LASTCHILD OF OutputRoot.XMLNSC
PARSE(X DOMAIN XMLNSC
NAME preserveProcessingInstructions
OPTIONS XMLNSC.ProcessingInstructionsRetainAll);
-- do it again, this time discarding processing instructions
CREATE LASTCHILD OF OutputRoot.XMLNSC
PARSE(X DOMAIN XMLNSC
NAME discardProcessingInstructions
OPTIONS XMLNSC.ProcessingInstructionsRetainNone);