Ejemplo n.º 1
0
 public void Text()
 {
     XPathPart part = new XPathPart("text()[5]");
       Assert.AreEqual(XPathPartType.Text, part.Type);
       Assert.AreEqual("text()", part.LocalName);
       Assert.AreEqual(5, part.Index);
       Assert.AreEqual(null, part.Namespace);
 }
Ejemplo n.º 2
0
 public void Index()
 {
     XPathPart part = new XPathPart("element[2]");
       Assert.AreEqual(XPathPartType.Element, part.Type);
       Assert.AreEqual("element", part.LocalName);
       Assert.AreEqual(2, part.Index);
       Assert.AreEqual(null, part.Namespace);
 }
Ejemplo n.º 3
0
 public void NamespaceElement()
 {
     XPathPart part = new XPathPart("{asd}:element");
       Assert.AreEqual(XPathPartType.Element, part.Type);
       Assert.AreEqual("element", part.LocalName);
       Assert.AreEqual(null, part.Index);
       Assert.AreEqual("asd", part.Namespace);
 }
Ejemplo n.º 4
0
 public void AttributeWithNamespace()
 {
     XPathPart part = new XPathPart("{http://go.ru}:@attr");
       Assert.AreEqual(XPathPartType.Attribute, part.Type);
       Assert.AreEqual("attr", part.LocalName);
       Assert.AreEqual(null, part.Index);
       Assert.AreEqual("http://go.ru", part.Namespace);
 }