Document.CreateNSResolver

Document.CreateNSResolver method

Adapts any DOM node to resolve packages so that an XPath expression can be easily evaluated relative to the context of the node where it appeared within the document. This adapter works like the DOM Level 3 method lookupNamespaceURI on nodes in resolving the packageURI from a given prefix using the current information available in the node’s hierarchy at the time lookupNamespaceURI is called, also correctly resolving the implicit xml prefix.

public IXPathNSResolver CreateNSResolver(Node nodeResolver)
ParameterTypeDescription
nodeResolverNodeThe node to be used as a context for package resolution.

Return Value

IXPathNSResolver which resolves packages with respect to the definitions in scope for a specified node.

See Also