Partager via


QualifiedName.FromString Method (String, XmlReader)

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

Namespace: Microsoft.Web.Services3.Xml
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)

Usage

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

Syntax

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

Parameters

  • value
    A qualified name in a string representation.
  • context
    An 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
ArgumentNullException

context is null.

-or-

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

FormatException

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

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 2000, Windows 2000 Server, Windows 2000 Advanced Server

Target Platforms

See Also

Reference

QualifiedName Class
QualifiedName Members
Microsoft.Web.Services3.Xml Namespace