private void OutputRecord(BuilderInfo node) {
if(this.outputXmlDecl) {
WriteXmlDeclaration();
}
Indent(0); // we can have only top level stuff here
switch (node.NodeType) {
case XmlNodeType.Element:
Debug.Fail("Should never get here");
break;
case XmlNodeType.Text:
case XmlNodeType.Whitespace:
case XmlNodeType.SignificantWhitespace:
WriteTextNode(node);
break;
case XmlNodeType.CDATA:
Debug.Fail("Should never get here");
break;
case XmlNodeType.EntityReference:
Write(s_Ampersand);
WriteName(node.Prefix, node.LocalName);
Write(s_Semicolon);
break;
case XmlNodeType.ProcessingInstruction:
WriteProcessingInstruction(node);
break;
case XmlNodeType.Comment:
Write(s_CommentBegin);
Write(node.Value);
Write(s_CommentEnd);
break;
case XmlNodeType.Document:
break;
case XmlNodeType.DocumentType:
Write(node.Value);
break;
case XmlNodeType.EndElement:
Debug.Fail("Should never get here");
break;
default:
break;
}
}