public static XdmNode ToXdmNode(this XPathItem value, SaxonItemFactory itemFactory) { if (value == null) throw new ArgumentNullException("value"); if (value.IsNode) { return ToXdmNode((XPathNavigator)value, itemFactory); } return ToXdmNode(itemFactory.CreateDocument(value.TypedValue), itemFactory); }
public static XdmNode ToXdmNode(this object value, SaxonItemFactory itemFactory) { if (value == null) throw new ArgumentNullException("value"); XPathItem item = value as XPathItem; if (item != null) { return ToXdmNode(item, itemFactory); } return ToXdmNode(itemFactory.CreateDocument(value), itemFactory); }