Edit

Share via


'prefix' is an XML prefix and cannot be used as an expression

'prefix' is an XML prefix and cannot be used as an expression. Use the GetXmlNamespace operator to create a namespace object.

The prefix for an XML namespace that is imported by using the Imports statement cannot be used outside an XML literal.

Error ID: BC30114

To correct this error

  • If you have to refer to part of the imported XML namespace, use the GetXmlNamespace operator to retrieve an XNamespace object. Use that object instead of the XML namespace prefix.

  • If you are using the XML namespace prefix to qualify an XML literal, ensure that you are using appropriate syntax for the XML literal.

See also