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.Specified

Gets a value indicating whether the value was explicitly set.

[Visual Basic]
Overridable Public ReadOnly Property Specified As Boolean
[C#]
public bool Specified {virtual get;}
[C++]
public: __property virtual bool get_Specified();
[JScript]
public function get Specified() : Boolean;

Property Value

true if this attribute was explicitly given a value in the original document; otherwise, false.

Remarks

Note that the implementation is in charge of this property, not the user. If the user changes the value of the attribute (even if it ends up having the same value as the default value) then the specified flag is automatically flipped to true. To re-specify the attribute as the default value from the DTD, the user must delete the attribute. The implementation will then make a new attribute available with specified set to false and the default value (if one exists).

In summary:

  1. If the attribute has an assigned value in the document then specified is true, and the value is the assigned value.
  2. If the attribute has no assigned value in the document and has a default value in the DTD, then specified is false, and the value is the default value in the DTD.
  3. If the attribute has no assigned value in the document and has a value of #IMPLIED in the DTD, then the attribute does not appear in the structure model of the document.

See Also

XmlAttribute Class | XmlAttribute Members | System.NewXml Namespace