Beispiel #1
0
        public void FindsNodes()
        {
            var mem = new RamMnemonic();

            mem.Contents()
            .UpdateXml(
                "xml-xocks",
                new XMLCursor(
                    new InputOf("<root><item>A</item><item>B</item></root>")
                    ).AsNode()
                );

            var xoc = new MemorizedXocument("xml-xocks", mem);

            Assert.Equal(
                1,
                xoc.Nodes("//item[text() = 'A']").Count
                );
        }
Beispiel #2
0
        public void HasNodeContent()
        {
            var mem = new RamMnemonic();

            mem.Contents()
            .UpdateXml(
                "xml-xocks",
                new XMLCursor(
                    new InputOf("<root><item>A</item><item>B</item></root>")
                    ).AsNode()
                );

            var xoc = new MemorizedXocument("xml-xocks", mem);

            Assert.Equal(
                "A",
                xoc.Nodes("//item")[0].Values("text()")[0]
                );
        }