private IEnumerable<XPathItem> EnumerateItems(XQueryContext context, string[] items) { foreach (String id in items) { IXPathNavigable doc = context.OpenDocument(_sources[id]); yield return doc.CreateNavigator(); } }
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))); }