private void FinalizeRecord() {
switch (this.mainNode.NodeType) {
case XmlNodeType.Element:
// Save count since FixupElement can add attribute...
int attributeCount = this.attributeCount;
FixupElement();
FixupAttributes(attributeCount);
AnalyzeSpaceLang();
AppendNamespaces();
break;
case XmlNodeType.Comment:
AnalyzeComment();
break;
case XmlNodeType.ProcessingInstruction:
AnalyzeProcessingInstruction();
break;
}
}