本文整理汇总了C#中MonoDevelop.XmlEditor.XmlElementPath类的典型用法代码示例。如果您正苦于以下问题:C# XmlElementPath类的具体用法?C# XmlElementPath怎么用?C# XmlElementPath使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XmlElementPath类属于MonoDevelop.XmlEditor命名空间,在下文中一共展示了XmlElementPath类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("foo", "http://foo.com"));
attributeCompletionData = SchemaCompletionData.GetAttributeCompletionData(path);
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:7,代码来源:SimpleContentWithAttributeTestFixture.cs
示例2: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("schema", "http://www.w3.org/2001/XMLSchema"));
schemaChildElements = SchemaCompletionData.GetChildElementCompletionData(path);
//schemaAttributes = SchemaCompletionData.GetAttributeCompletionData(path);
// Get include elements attributes.
path.Elements.Add(new QualifiedName("include", "http://www.w3.org/2001/XMLSchema"));
includeAttributes = SchemaCompletionData.GetAttributeCompletionData(path);
// Get annotation element info.
path.Elements.RemoveLast();
path.Elements.Add(new QualifiedName("annotation", "http://www.w3.org/2001/XMLSchema"));
annotationChildElements = SchemaCompletionData.GetChildElementCompletionData(path);
annotationAttributes = SchemaCompletionData.GetAttributeCompletionData(path);
// Get app info attributes.
path.Elements.Add(new QualifiedName("appinfo", "http://www.w3.org/2001/XMLSchema"));
appInfoAttributes = SchemaCompletionData.GetAttributeCompletionData(path);
// Get foo attributes.
path = new XmlElementPath();
path.Elements.Add(new QualifiedName("foo", "http://www.w3.org/2001/XMLSchema"));
fooAttributes = SchemaCompletionData.GetAttributeCompletionData(path);
}
示例3: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("html", "http://foo/xhtml"));
htmlChildElements = SchemaCompletionData.GetChildElementCompletionData(path);
}
示例4: NotEqual
public void NotEqual()
{
XmlElementPath newPath = new XmlElementPath();
newPath.Elements.Add(new QualifiedName("Foo", "bar"));
Assert.IsFalse(newPath.Equals(path), "Should not be equal.");
}
示例5: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("note", "http://www.w3schools.com"));
noteChildElements = SchemaCompletionData.GetChildElementCompletionData(path);
}
示例6: Equality
public void Equality()
{
XmlElementPath newPath = new XmlElementPath();
newPath.Elements.Add(new QualifiedName("foo", "http://foo"));
Assert.IsTrue(newPath.Equals(path), "Should be equal.");
}
示例7: NoAttributesForUnknownElement
public void NoAttributesForUnknownElement()
{
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("foobar", "http://www.w3schools.com"));
CompletionDataList attributes = SchemaCompletionData.GetAttributeCompletionData(path);
Assert.AreEqual(0, attributes.Count, "Should not find attributes for unknown element.");
}
示例8: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("note", "http://www.w3schools.com"));
attributeCompletionData = SchemaCompletionData.GetAttributeCompletionData(path);
attributeName = attributeCompletionData[0].DisplayText;
}
示例9: TextHasNoChildElements
public void TextHasNoChildElements()
{
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("note", "http://www.w3schools.com"));
path.Elements.Add(new QualifiedName("text", "http://www.w3schools.com"));
Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Count,
"Should be no child elements.");
}
示例10: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("project", "http://nant.sf.net//nant-0.84.xsd"));
path.Elements.Add(new QualifiedName("attrib", "http://nant.sf.net//nant-0.84.xsd"));
attributes = SchemaCompletionData.GetAttributeCompletionData(path);
}
示例11: CompactPathItem
public void CompactPathItem()
{
XmlElementPath newPath = new XmlElementPath();
newPath.Elements.Add(new QualifiedName("bar", "http://bar", "b"));
path.Compact();
Assert.IsTrue(newPath.Equals(path), "Should be equal.");
}
示例12: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("note", "http://www.w3schools.com"));
XmlSchemaElement element = SchemaCompletionData.FindElement(path);
attribute = SchemaCompletionData.FindAttribute(element, "name");
missingAttribute = SchemaCompletionData.FindAttribute(element, "missing");
}
示例13: FixtureInit
public override void FixtureInit()
{
rootElementCompletionData = SchemaCompletionData.GetElementCompletionData();
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("foo", "http://foo.com"));
fooChildElementCompletionData = SchemaCompletionData.GetChildElementCompletionData(path);
}
示例14: Init
public void Init()
{
path = new XmlElementPath();
firstQualifiedName = new QualifiedName("foo", "http://foo", "f");
path.Elements.Add(firstQualifiedName);
secondQualifiedName = new QualifiedName("bar", "http://bar", "b");
path.Elements.Add(secondQualifiedName);
}
示例15: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("person", "http://foo"));
personElementChildren = SchemaCompletionData.GetChildElementCompletionData(path);
path.Elements.Add(new QualifiedName("firstname", "http://foo"));
firstNameAttributes = SchemaCompletionData.GetAttributeCompletionData(path);
firstNameElementChildren = SchemaCompletionData.GetChildElementCompletionData(path);
}