Ejemplo n.º 1
0
 private IEnumerable<XPathItem> EnumerateItems(XQueryContext context, string[] items)
 {
     foreach (String id in items)
     {
         IXPathNavigable doc = context.OpenDocument(_sources[id]);
         yield return doc.CreateNavigator();
     }
 }
Ejemplo n.º 2
0
 private bool CompareXML(XQueryContext context, string sourceFile, XQueryNodeIterator iter)
 {
     IXPathNavigable doc = context.OpenDocument(sourceFile);
     XQueryNodeIterator src = new NodeIterator(new XPathItem[] { doc.CreateNavigator() });
     TreeComparer comparer = new TreeComparer();
     comparer.IgnoreWhitespace = true;
     return comparer.DeepEqual(src, new NodeIterator(DocumentIterator(context, iter)));
 }