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 ); }
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] ); }