Saxon API for .NET

QName Constructor (String, XdmNode)

Construct a QName from a lexical QName, supplying an element node whose in-scope namespaces are to be used to resolve any prefix contained in the QName.

public QName(
   string lexicalQName,
   XdmNode element
);

Parameters

lexicalQName
The lexical QName, in the form
prefix:local
or simply local.
element
The element node whose in-scope namespaces are to be used to resolve the prefix part of the lexical QName.

Remarks

This constructor checks that the components of the QName are lexically valid.

If the lexical QName has no prefix, the name is considered to be in the default namespace, as defined by xmlns="...".

If the prefix of the lexical QName is not in scope, returns null.

Exceptions

Exception TypeCondition
ArgumentExceptionIf the prefix of the lexical QName is not in scope
ArgumentExceptionIf the lexical QName is invalid (for example, if it contains invalid characters)

See Also

QName Class | Saxon.Api Namespace | QName Constructor Overload List