当前位置: 首页>>代码示例>>C#>>正文


C# Xml.XmlText类代码示例

本文整理汇总了C#中System.Xml.XmlText的典型用法代码示例。如果您正苦于以下问题:C# XmlText类的具体用法?C# XmlText怎么用?C# XmlText使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


XmlText类属于System.Xml命名空间,在下文中一共展示了XmlText类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetUp

		public void SetUp()
		{
			XmlCompletionDataProvider completionDataProvider = new XmlCompletionDataProvider(new XmlSchemaCompletionDataCollection(), null, String.Empty);
			treeViewContainerControl = new XmlTreeViewContainerControl();
			treeView = treeViewContainerControl.TreeView;
			treeViewContainerControl.LoadXml(GetXml(), completionDataProvider);
			doc = treeViewContainerControl.Document;
			
			clipboardHandler = treeViewContainerControl as IClipboardHandler;
			
			htmlElement = doc.DocumentElement;
			bodyElement = htmlElement.FirstChild as XmlElement;
			paragraphElement = bodyElement.SelectSingleNode("p") as XmlElement;
			paragraphText = paragraphElement.SelectSingleNode("text()") as XmlText;
			bodyComment = bodyElement.SelectSingleNode("comment()") as XmlComment;
			
			htmlTreeNode = treeView.Nodes[0] as XmlElementTreeNode;
			htmlTreeNode.PerformInitialization();
			bodyTreeNode = htmlTreeNode.FirstNode as XmlElementTreeNode;
			bodyTreeNode.PerformInitialization();
			bodyCommentTreeNode = bodyTreeNode.FirstNode as XmlCommentTreeNode;
			paragraphTreeNode = bodyTreeNode.LastNode as XmlElementTreeNode;
			paragraphTreeNode.PerformInitialization();
			paragraphTextTreeNode = paragraphTreeNode.FirstNode as XmlTextTreeNode;
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:25,代码来源:PasteInTreeControlTestFixture.cs

示例2: ExecuteCore

 protected override void ExecuteCore(XmlText text)
 {
     Validate();
     var element = text.OwnerDocument.CreateElement(Name);
     element.InnerText = text.Value;
     text.ParentNode.ReplaceChild(element, text);
 }
开发者ID:rh,项目名称:mix,代码行数:7,代码来源:ConvertToElement.cs

示例3: AppendTextToDocumentation

 void AppendTextToDocumentation(XmlText textNode)
 {
     if (textNode != null) {
         if (textNode.Data != null) {
             documentation.Append(textNode.Data);
         }
     }
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:8,代码来源:SchemaDocumentation.cs

示例4: XmlTextTreeNode

		public XmlTextTreeNode(XmlText xmlText)
			: base(xmlText)
		{
			this.xmlText = xmlText;
			ImageKey = XmlTextTreeNodeImageKey;
			SelectedImageKey = ImageKey;
			Update();
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:8,代码来源:XmlTextTreeNode.cs

示例5: Init

        public void Init()
        {
            base.InitFixture();
            paragraphElement = (XmlElement)editor.Document.SelectSingleNode("/html/body/p");
            textNode = (XmlText)paragraphElement.SelectSingleNode("text()");
            mockXmlTreeView.SelectedTextNode = textNode;

            editor.InsertTextNodeBefore();
        }
开发者ID:BackupTheBerlios,项目名称:nantgui,代码行数:9,代码来源:InsertTextNodeBeforeTestFixture.cs

示例6: Init

		public void Init()
		{
			base.InitFixture();
			rootElement = editor.Document.DocumentElement;
			bodyElement = (XmlElement)rootElement.FirstChild;
			paragraphElement = (XmlElement)bodyElement.SelectSingleNode("p");
			bodyComment = (XmlComment)bodyElement.SelectSingleNode("comment()");
			paragraphText = (XmlText)paragraphElement.SelectSingleNode("text()");
		}
开发者ID:hanjackcyw,项目名称:SharpDevelop,代码行数:9,代码来源:PasteTestFixture.cs

示例7: Print

        public void Print(XmlText text, bool enter)
        {
            if (SkipText)
            {
                return;
            }

            Context.Output.Write(text.Value.Trim());

            if (enter)
            {
                Context.Output.WriteLine();
            }
        }
开发者ID:rh,项目名称:mix,代码行数:14,代码来源:Show.cs

示例8: ExecuteCore

        protected override void ExecuteCore(XmlText text)
        {
            Validate();

            var element = text.ParentNode as XmlElement;

            if (element != null && element.Attributes[Name] == null)
            {
                var attribute = text.OwnerDocument.CreateAttribute(Name);
                attribute.Value = text.Value;
                element.Attributes.Append(attribute);
                element.RemoveChild(text);
            }
        }
开发者ID:rh,项目名称:mix,代码行数:14,代码来源:ConvertToAttribute.cs

示例9: SetUpFixture

		public void SetUpFixture()
		{
			base.InitFixture();
			
			// User selects text node and alters its text.
			textNode = (XmlText)mockXmlTreeView.Document.DocumentElement.FirstChild;
			mockXmlTreeView.SelectedTextNode = textNode;
			editor.SelectedNodeChanged();
			mockXmlTreeView.TextContent = "new value";
			editor.TextContentChanged();
			
			// The user then selects another element and then switches
			// back to the text node.
			mockXmlTreeView.SelectedElement = mockXmlTreeView.Document.DocumentElement;
			editor.SelectedNodeChanged();
			mockXmlTreeView.TextContent = String.Empty;
			mockXmlTreeView.SelectedTextNode = textNode;
			editor.SelectedNodeChanged();
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:19,代码来源:TextNodeTextChangedTestFixture.cs

示例10: SetUp

		public void SetUp()
		{
			treeViewContainerControl = new DerivedXmlTreeViewContainerControl();
			treeView = treeViewContainerControl.TreeView;
			treeViewContainerControl.LoadXml(GetXml());
			doc = treeViewContainerControl.Document;
			
			clipboardHandler = treeViewContainerControl as IClipboardHandler;
			
			htmlElement = doc.DocumentElement;
			bodyElement = htmlElement.FirstChild as XmlElement;
			paragraphElement = bodyElement.SelectSingleNode("p") as XmlElement;
			paragraphText = paragraphElement.SelectSingleNode("text()") as XmlText;
			bodyComment = bodyElement.SelectSingleNode("comment()") as XmlComment;
			
			htmlTreeNode = treeView.Nodes[0] as XmlElementTreeNode;
			htmlTreeNode.PerformInitialization();
			bodyTreeNode = htmlTreeNode.FirstNode as XmlElementTreeNode;
			bodyTreeNode.PerformInitialization();
			bodyCommentTreeNode = bodyTreeNode.FirstNode as XmlCommentTreeNode;
			paragraphTreeNode = bodyTreeNode.LastNode as XmlElementTreeNode;
			paragraphTreeNode.PerformInitialization();
			paragraphTextTreeNode = paragraphTreeNode.FirstNode as XmlTextTreeNode;
		}
开发者ID:hpsa,项目名称:SharpDevelop,代码行数:24,代码来源:PasteInTreeControlTestFixture.cs

示例11: InsertTextNodeBefore

		/// <summary>
		/// Inserts a text node before the currently selected
		/// node.
		/// </summary>
		public void InsertTextNodeBefore(XmlText textNode)
		{
			InsertTextNode(textNode, InsertionMode.Before);
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:8,代码来源:XmlTreeViewControl.cs

示例12: RemoveTextNode

		/// <summary>
		/// Removes the specified text node from the tree.
		/// </summary>
		public void RemoveTextNode(XmlText textNode)
		{
			XmlTextTreeNode node = FindTextNode(textNode);
			if (node != null) {
				node.Remove();
			}
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:10,代码来源:XmlTreeViewControl.cs

示例13: AppendChildTextNode

		/// <summary>
		/// Appends a new child text node to the currently selected element.
		/// </summary>
		public void AppendChildTextNode(XmlText textNode)
		{
			XmlElementTreeNode selectedNode = SelectedElementNode;
			if (selectedNode != null) {
				XmlTextTreeNode newNode = new XmlTextTreeNode(textNode);
				newNode.AddTo(selectedNode);
				selectedNode.Expand();
			}
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:12,代码来源:XmlTreeViewControl.cs

示例14: AddXmlText

 private void AddXmlText(StringBuilder sb, int indentationLevel, XmlText xmlText)
 {
     Indent(sb, indentationLevel);
     sb.Append(string.Format(@"\cf{0}{1}\par", (int)ColorKinds.Value, XmlEncode(xmlText.Value)));
 }
开发者ID:Green-Bug,项目名称:nunit-gui,代码行数:5,代码来源:Xml2RtfConverter.cs

示例15: UpdateTextNode

		/// <summary>
		/// Updates the corresponding tree node's text.
		/// </summary>
		public void UpdateTextNode(XmlText textNode)
		{
			xmlElementTreeView.UpdateTextNode(textNode);
		}
开发者ID:hpsa,项目名称:SharpDevelop,代码行数:7,代码来源:XmlTreeViewContainerControl.cs


注:本文中的System.Xml.XmlText类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。