Share via


QualifiedName.FromString Method

Parses a qualified name in string representation into a QualifiedName instance, using the specified XML node context.

Namespace: Microsoft.Web.Services2.Xml
Assembly: Microsoft.Web.Services2 (in microsoft.web.services2.dll)

Usage

'Usage
Dim value As String
Dim context As XmlNode
Dim returnValue As QualifiedName
returnValue = QualifiedName.FromString(value, context)

Syntax

'Declaration
Public Shared Function FromString( _
    ByVal value As String, _
    ByVal context As XmlNode _
) As QualifiedName
public static QualifiedName FromString(
    string value, 
    XmlNode context
);
public: static QualifiedName^ FromString(
    String^ value, 
    XmlNode^ context
);
public static QualifiedName FromString(
    System.String value, 
    XmlNode context
);
public static function FromString(
     value : String, 
     context : XmlNode
) : QualifiedName;

Parameters

  • value
    A qualified name in a string representation.
  • context
    An System.Xml.XmlNode containing a namespace declaration for the namespace prefix specified in the value parameter.

Return Value

A QualifiedName from the parsed string and context.

Exceptions

Exception type Condition
System.ArgumentNullException

context is null.

-or-

value is null or an empty string ("").

System.FormatException

value is not in the format <namespacePrefix>:<localName>.

System.FormatException

context does not contain a namespace declaration for the namespace prefix specified in the value parameter.

Remarks

The value parameter must be in the format <namespacePrefix>:<localName>. The FromString method gets the namespace declaration for the prefix and creates an instance of the QualifiedName class based on the namespace declaration and the local name.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, and Windows 2000

Target Platforms

Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, Pocket PC, Windows CE, Smart Phone

See Also

Reference

QualifiedName Class
Microsoft.Web.Services2.Xml Namespace

Other Resources

QualifiedName Members