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


C# XmlElementPath.AddElement方法代码示例

本文整理汇总了C#中ICSharpCode.XmlEditor.XmlElementPath.AddElement方法的典型用法代码示例。如果您正苦于以下问题:C# XmlElementPath.AddElement方法的具体用法?C# XmlElementPath.AddElement怎么用?C# XmlElementPath.AddElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ICSharpCode.XmlEditor.XmlElementPath的用法示例。


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

示例1: FixtureInit

		public override void FixtureInit()
		{
			XmlElementPath path = new XmlElementPath();
			path.AddElement(new QualifiedName("schema", "http://www.w3.org/2001/XMLSchema"));
			
			schemaChildElements = SchemaCompletion.GetChildElementCompletion(path);
			schemaAttributes = SchemaCompletion.GetAttributeCompletion(path);
			
			// Get include elements attributes.
			path.AddElement(new QualifiedName("include", "http://www.w3.org/2001/XMLSchema"));
			includeAttributes = SchemaCompletion.GetAttributeCompletion(path);
		
			// Get annotation element info.
			path.Elements.RemoveLast();
			path.AddElement(new QualifiedName("annotation", "http://www.w3.org/2001/XMLSchema"));
			
			annotationChildElements = SchemaCompletion.GetChildElementCompletion(path);
			annotationAttributes = SchemaCompletion.GetAttributeCompletion(path);
		
			// Get app info attributes.
			path.AddElement(new QualifiedName("appinfo", "http://www.w3.org/2001/XMLSchema"));
			appInfoAttributes = SchemaCompletion.GetAttributeCompletion(path);
			
			// Get foo attributes.
			path = new XmlElementPath();
			path.AddElement(new QualifiedName("foo", "http://www.w3.org/2001/XMLSchema"));
			fooAttributes = SchemaCompletion.GetAttributeCompletion(path);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:28,代码来源:ExtensionElementTestFixture.cs

示例2: Init

		public void Init()
		{
			XmlElementPath path = new XmlElementPath();
			path.AddElement(new QualifiedName("a", "a-namespace"));
			path.AddElement(new QualifiedName("b", "b-namespace"));
			paths = new XmlElementPathsByNamespace(path);
		}
开发者ID:fanyjie,项目名称:SharpDevelop,代码行数:7,代码来源:TwoElementPathsByNamespaceTestFixture.cs

示例3: FixtureInit

		public override void FixtureInit()
		{
			XmlElementPath path = new XmlElementPath();
			path.AddElement(new QualifiedName("root", "http://foo"));
			path.AddElement(new QualifiedName("bar", "http://foo"));
			barElementAttributes = SchemaCompletion.GetAttributeCompletion(path);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:7,代码来源:MissingSchemaElementTestFixture.cs

示例4: TextHasNoChildElements

 public void TextHasNoChildElements()
 {
     XmlElementPath path = new XmlElementPath();
     path.AddElement(new QualifiedName("note", "http://www.w3schools.com"));
     path.AddElement(new QualifiedName("text", "http://www.w3schools.com"));
     Assert.AreEqual(0, SchemaCompletion.GetChildElementCompletion(path).Count,
                     "Should be no child elements.");
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:8,代码来源:ChoiceTestFixture.cs

示例5: Equality

		public void Equality()
		{
			XmlElementPath newPath = new XmlElementPath();
			newPath.AddElement(new QualifiedName("foo", "http://foo", "f"));
			newPath.AddElement(new QualifiedName("bar", "http://bar", "b"));
			
			Assert.IsTrue(newPath.Equals(path), "Should be equal.");
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:8,代码来源:TwoElementPathTestFixture.cs

示例6: NotEqual

		public void NotEqual()
		{
			XmlElementPath newPath = new XmlElementPath();
			newPath.AddElement(new QualifiedName("aaa", "a", "a"));
			newPath.AddElement(new QualifiedName("bbb", "b", "b"));
			
			Assert.IsFalse(newPath.Equals(path), "Should not be equal.");
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:8,代码来源:TwoElementPathTestFixture.cs

示例7: FirstXmlElementPathHasTwoElements

        public void FirstXmlElementPathHasTwoElements()
        {
            XmlElementPath expectedPath = new XmlElementPath();
            expectedPath.AddElement(new QualifiedName("a", "a-namespace"));
            expectedPath.AddElement(new QualifiedName("aa", "a-namespace"));

            Assert.AreEqual(expectedPath, paths[0]);
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:8,代码来源:OneAndTwoElementPathsTestFixture.cs

示例8: FixtureInit

		public override void FixtureInit()
		{
			XmlElementPath path = new XmlElementPath();
			path.AddElement(new QualifiedName("project", "http://nant.sf.net//nant-0.84.xsd"));
			path.AddElement(new QualifiedName("attrib", "http://nant.sf.net//nant-0.84.xsd"));
			
			attributes = SchemaCompletion.GetAttributeCompletion(path);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:8,代码来源:ChildElementAttributesTestFixture.cs

示例9: Init

		public void Init()
		{
			path = new XmlElementPath();
			firstQualifiedName = new QualifiedName("foo", "http://foo", "f");
			path.AddElement(firstQualifiedName);
			
			secondQualifiedName = new QualifiedName("bar", "http://bar", "b");
			path.AddElement(secondQualifiedName);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:9,代码来源:TwoElementPathTestFixture.cs

示例10: FixtureInit

        public override void FixtureInit()
        {
            XmlElementPath path = new XmlElementPath();
            path.AddElement(new QualifiedName("person", "http://foo"));
            personElementChildren = SchemaCompletion.GetChildElementCompletion(path);

            path.AddElement(new QualifiedName("firstname", "http://foo"));
            firstNameAttributes = SchemaCompletion.GetAttributeCompletion(path);
            firstNameElementChildren = SchemaCompletion.GetChildElementCompletion(path);
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:10,代码来源:AllElementTestFixture.cs

示例11: GetActiveElementStartPathForChildElementWithNamespacePrefix

		public void GetActiveElementStartPathForChildElementWithNamespacePrefix()
		{
			string text = "<f:foo xmlns:f='" + namespaceURI + "' ><f:bar ";
			elementPath = XmlParser.GetActiveElementStartPath(text, text.Length);
			
			expectedElementPath = new XmlElementPath();
			expectedElementPath.AddElement(new QualifiedName("foo", namespaceURI, "f"));
			expectedElementPath.AddElement(new QualifiedName("bar", namespaceURI, "f"));
			Assert.IsTrue(expectedElementPath.Equals(elementPath), 
			              "Incorrect active element path.");
		}		
开发者ID:hefnerliu,项目名称:SharpDevelop,代码行数:11,代码来源:ActiveElementStartPathTestFixture.cs

示例12: GetParentElementPathForTwoElementsInDifferentNamespaces

		public void GetParentElementPathForTwoElementsInDifferentNamespaces()
		{
			string text = "<bar xmlns='http://test.com'><foo xmlns='" + namespaceURI + "' ><";
			elementPath = XmlParser.GetParentElementPath(text);
			
			expectedElementPath = new XmlElementPath();
			expectedElementPath.AddElement(new QualifiedName("bar", "http://test.com"));
			expectedElementPath.AddElement(new QualifiedName("foo", namespaceURI));
			Assert.IsTrue(elementPath.Equals(expectedElementPath), 
			              "Incorrect active element path.");
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:11,代码来源:ParentElementPathTestFixture.cs

示例13: XmlElementPath

		public void GetAttributeCompletion_TemplateElementIsChildOfStylesheetElement_SubstitutionGroupUsedForTemplateAndMatchAttributeReturned()
		{
			var path = new XmlElementPath();
			path.AddElement(new QualifiedName("stylesheet", namespaceURI));
			path.AddElement(new QualifiedName("template", namespaceURI));
			
			XmlCompletionItemCollection completionItems = schemaCompletion.GetAttributeCompletion(path);
			bool contains = completionItems.Contains("match");
			
			Assert.IsTrue(contains);
		}
开发者ID:fanyjie,项目名称:SharpDevelop,代码行数:11,代码来源:XsltSchemaTests.cs

示例14: PathTest3

		public void PathTest3()
		{
			string text = "<foo xmlns='" + namespaceURI + "'><bar>";
			elementPath = XmlParser.GetActiveElementStartPathAtIndex(text, text.IndexOf("ar>"));
			
			expectedElementPath = new XmlElementPath();
			expectedElementPath.AddElement(new QualifiedName("foo", namespaceURI));
			expectedElementPath.AddElement(new QualifiedName("bar", namespaceURI));
			Assert.IsTrue(elementPath.Equals(expectedElementPath), 
			              "Incorrect active element path.");
		}
开发者ID:Inzaghi2012,项目名称:SharpDevelop,代码行数:11,代码来源:ActiveElementUnderCursorTests.cs

示例15: FixtureInit

		public override void FixtureInit()
		{
			XmlElementPath path = new XmlElementPath();
			
			path.AddElement(new QualifiedName("html", "http://foo/xhtml"));
			path.AddElement(new QualifiedName("body", "http://foo/xhtml"));
			
			childElements = SchemaCompletion.GetChildElementCompletion(path);
			
			path.AddElement(new QualifiedName("p", "http://foo/xhtml"));
			paraAttributes = SchemaCompletion.GetAttributeCompletion(path);
		}
开发者ID:hefnerliu,项目名称:SharpDevelop,代码行数:12,代码来源:GroupRefTestFixture.cs


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