NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

XmlAttribute.Prefix

Gets or sets the namespace prefix of this node.

[Visual Basic]
Overridable Public Property Prefix As String
[C#]
public string Prefix {override get; override set;}
[C++]
public: __property virtual String* get_Prefix();
public: __property virtual void set_Prefix(String*);
[JScript]
public function get Prefix() : String;
public function set Prefix(String);

Property Value

The namespace prefix of this node. If there is no prefix, this property is null.

Exceptions

Exception Type Condition
INVALID_CHARACTER_ERR Raised if the specified prefix contains an illegal character
NO_MODIFICATION_ALLOWED_ERR Raised if this node is readonly
NAMESPACE_ERR Raised if the specified prefix is malformed, if the namespaceURI of this node is null, if the specified prefix is "xml" and the namespaceURI of this node is different from "http://www.w3.org/XML/1998/namespace", if this node is an attribute and the specified prefix is "xmlns" and the namespaceURI of this node is different from "http://www.w3.org/2000/xmlns/", or if this node is an attribute and the qualifiedName of this node is "xmlns" [Namespaces].

Remarks

For example, the "xxx" for the element <myelement xxx:yyy="Some value"/> Note that setting this property, when permitted, changes the name property, which holds the qualified name, as well as the TagName on XmlElement and the Name properties on XmlAttribute. Note also that changing the prefix of an attribute that is known to have a default value, does not make a new attribute with the default value and the original prefix appear, since the namespaceURI and localName do not change.

See Also

XmlAttribute Class | XmlAttribute Members | System.NewXml Namespace