public override Item newItem(XmlNode node, XmlEditor document) { Item item = null; if (node.NodeType == XmlNodeType.Element) { item = new ElementItem(document); } else if (node.NodeType == XmlNodeType.Attribute ) { item = new AttrItem(document); } else if (node.NodeType == XmlNodeType.Text) { item = new TextItem(document); } else if (node.NodeType == XmlNodeType.ProcessingInstruction ) { item = new ProcessingInstructionItem(document); } else if (node.NodeType == XmlNodeType.XmlDeclaration ) { item = new DeclarationItem(document); } else if (node.NodeType == XmlNodeType.Comment) { item = new CommentItem(document); } else if (node.NodeType == XmlNodeType.CDATA) { item = new CDATAItem(document); } else if (node.NodeType == XmlNodeType.DocumentType) { item = new DocumentTypeItem(document); } else if (node.NodeType == XmlNodeType.EntityReference) { item = new EntityReferenceItem(document); } //item.m_document = document; return item; }
public override Item newItem(XmlNode node, XmlEditor document) { Item item = null; if (node.NodeType == XmlNodeType.Element) { item = new ElementItem(document); } else if (node.NodeType == XmlNodeType.Attribute) { item = new AttrItem(document); } else if (node.NodeType == XmlNodeType.Text) { item = new TextItem(document); } else if (node.NodeType == XmlNodeType.ProcessingInstruction) { item = new ProcessingInstructionItem(document); } else if (node.NodeType == XmlNodeType.XmlDeclaration) { item = new DeclarationItem(document); } else if (node.NodeType == XmlNodeType.Comment) { item = new CommentItem(document); } else if (node.NodeType == XmlNodeType.CDATA) { item = new CDATAItem(document); } else if (node.NodeType == XmlNodeType.DocumentType) { item = new DocumentTypeItem(document); } else if (node.NodeType == XmlNodeType.EntityReference) { item = new EntityReferenceItem(document); } //item.m_document = document; return(item); }
// 创建一个EntityReferenceItem // parameter: // strName 名称 public EntityReferenceItem CreateEntityReferenceItem(string strName) { EntityReferenceItem item = new EntityReferenceItem(this); item.Name = strName; return item; }