mscorlib(4.0.0.0) API with additions
|
Represents an attribute. Valid and default values for the attribute are defined in a document type definition (DTD) or schema. More...
Public Member Functions | |
override XmlNode | CloneNode (bool deep) |
Creates a duplicate of this node. More... | |
override XmlNode | InsertBefore (XmlNode newChild, XmlNode refChild) |
Inserts the specified node immediately before the specified reference node. More... | |
override XmlNode | InsertAfter (XmlNode newChild, XmlNode refChild) |
Inserts the specified node immediately after the specified reference node. More... | |
override XmlNode | ReplaceChild (XmlNode newChild, XmlNode oldChild) |
Replaces the child node specified with the new child node specified. More... | |
override XmlNode | RemoveChild (XmlNode oldChild) |
Removes the specified child node. More... | |
override XmlNode | PrependChild (XmlNode newChild) |
Adds the specified node to the beginning of the list of child nodes for this node. More... | |
override XmlNode | AppendChild (XmlNode newChild) |
Adds the specified node to the end of the list of child nodes, of this node. More... | |
override void | WriteTo (XmlWriter w) |
Saves the node to the specified T:System.Xml.XmlWriter. More... | |
override void | WriteContentTo (XmlWriter w) |
Saves all the children of the node to the specified T:System.Xml.XmlWriter. More... | |
![]() | |
virtual XPathNavigator | CreateNavigator () |
Creates an T:System.Xml.XPath.XPathNavigator for navigating this object. More... | |
XmlNode | SelectSingleNode (string xpath) |
Selects the first XmlNode that matches the XPath expression. More... | |
XmlNode | SelectSingleNode (string xpath, XmlNamespaceManager nsmgr) |
Selects the first XmlNode that matches the XPath expression. Any prefixes found in the XPath expression are resolved using the supplied T:System.Xml.XmlNamespaceManager. More... | |
XmlNodeList | SelectNodes (string xpath) |
Selects a list of nodes matching the XPath expression. More... | |
XmlNodeList | SelectNodes (string xpath, XmlNamespaceManager nsmgr) |
Selects a list of nodes matching the XPath expression. Any prefixes found in the XPath expression are resolved using the supplied T:System.Xml.XmlNamespaceManager. More... | |
virtual void | Normalize () |
Puts all XmlText nodes in the full depth of the sub-tree underneath this XmlNode into a "normal" form where only markup (that is, tags, comments, processing instructions, CDATA sections, and entity references) separates XmlText nodes, that is, there are no adjacent XmlText nodes. More... | |
virtual bool | Supports (string feature, string version) |
Tests if the DOM implementation implements a specific feature. More... | |
virtual XmlNode | Clone () |
Creates a duplicate of this node. More... | |
IEnumerator | GetEnumerator () |
Get an enumerator that iterates through the child nodes in the current node. More... | |
virtual void | RemoveAll () |
Removes all the child nodes and/or attributes of the current node. More... | |
virtual string | GetNamespaceOfPrefix (string prefix) |
Looks up the closest xmlns declaration for the given prefix that is in scope for the current node and returns the namespace URI in the declaration. More... | |
virtual string | GetPrefixOfNamespace (string namespaceURI) |
Looks up the closest xmlns declaration for the given namespace URI that is in scope for the current node and returns the prefix defined in that declaration. More... | |
Public Attributes | |
override XmlNode | ParentNode => null |
Gets the parent of this node. For XmlAttribute nodes, this property always returns null . More... | |
override string | Name => name.Name |
Gets the qualified name of the node. More... | |
override string | LocalName => name.LocalName |
Gets the local name of the node. More... | |
override string | NamespaceURI => name.NamespaceURI |
Gets the namespace URI of this node. More... | |
override XmlNodeType | NodeType => XmlNodeType.Attribute |
Gets the type of the current node. More... | |
override XmlDocument | OwnerDocument => name.OwnerDocument |
Gets the T:System.Xml.XmlDocument to which this node belongs. More... | |
override IXmlSchemaInfo | SchemaInfo => name |
Gets the post-schema-validation-infoset that has been assigned to this node as a result of schema validation. More... | |
virtual bool | Specified => true |
Gets a value indicating whether the attribute value was explicitly set. More... | |
virtual XmlElement | OwnerElement => parentNode as XmlElement |
Gets the T:System.Xml.XmlElement to which the attribute belongs. More... | |
![]() | |
virtual XmlNodeList | ChildNodes => new XmlChildNodes(this) |
Gets all the child nodes of the node. More... | |
virtual XmlNode | PreviousSibling => null |
Gets the node immediately preceding this node. More... | |
virtual XmlNode | NextSibling => null |
Gets the node immediately following this node. More... | |
virtual XmlAttributeCollection | Attributes => null |
Gets an T:System.Xml.XmlAttributeCollection containing the attributes of this node. More... | |
virtual XmlNode | FirstChild => LastNode?.next |
Gets the first child of the node. More... | |
virtual XmlNode | LastChild => LastNode |
Gets the last child of the node. More... | |
virtual bool | HasChildNodes => LastNode != null |
Gets a value indicating whether this node has any child nodes. More... | |
virtual string | NamespaceURI => string.Empty |
Gets the namespace URI of this node. More... | |
virtual IXmlSchemaInfo | SchemaInfo => XmlDocument.NotKnownSchemaInfo |
Gets the post schema validation infoset that has been assigned to this node as a result of schema validation. More... | |
virtual XmlNode | PreviousText => null |
Gets the text node that immediately precedes this node. More... | |
Protected Member Functions | |
internal | XmlAttribute (string prefix, string localName, string namespaceURI, XmlDocument doc) |
Initializes a new instance of the T:System.Xml.XmlAttribute class. More... | |
Properties | |
override string | Prefix [get, set] |
Gets or sets the namespace prefix of this node. More... | |
override string | Value [get, set] |
Gets or sets the value of the node. More... | |
override string | InnerText [set] |
Sets the concatenated values of the node and all its children. More... | |
override string | InnerXml [set] |
Sets the value of the attribute. More... | |
override string | BaseURI [get] |
Gets the base Uniform Resource Identifier (URI) of the node. More... | |
![]() | |
abstract string | Name [get] |
Gets the qualified name of the node, when overridden in a derived class. More... | |
virtual string | Value [get, set] |
Gets or sets the value of the node. More... | |
abstract XmlNodeType | NodeType [get] |
Gets the type of the current node, when overridden in a derived class. More... | |
virtual XmlNode | ParentNode [get] |
Gets the parent of this node (for nodes that can have parents). More... | |
virtual XmlDocument | OwnerDocument [get] |
Gets the T:System.Xml.XmlDocument to which this node belongs. More... | |
virtual string | Prefix [get, set] |
Gets or sets the namespace prefix of this node. More... | |
abstract string | LocalName [get] |
Gets the local name of the node, when overridden in a derived class. More... | |
virtual bool | IsReadOnly [get] |
Gets a value indicating whether the node is read-only. More... | |
virtual string | InnerText [get, set] |
Gets or sets the concatenated values of the node and all its child nodes. More... | |
virtual string | OuterXml [get] |
Gets the markup containing this node and all its child nodes. More... | |
virtual string | InnerXml [get, set] |
Gets or sets the markup representing only the child nodes of this node. More... | |
virtual string | BaseURI [get] |
Gets the base URI of the current node. More... | |
virtual XmlElement | this[string name] [get] |
Gets the first child element with the specified P:System.Xml.XmlNode.Name. More... | |
virtual XmlElement | this[string localname, string ns] [get] |
Gets the first child element with the specified P:System.Xml.XmlNode.LocalName and P:System.Xml.XmlNode.NamespaceURI. More... | |
Represents an attribute. Valid and default values for the attribute are defined in a document type definition (DTD) or schema.
Definition at line 7 of file XmlAttribute.cs.
|
protected |
Initializes a new instance of the T:System.Xml.XmlAttribute class.
prefix | The namespace prefix. |
localName | The local name of the attribute. |
namespaceURI | The namespace uniform resource identifier (URI). |
doc | The parent XML document. |
Definition at line 226 of file XmlAttribute.cs.
Adds the specified node to the end of the list of child nodes, of this node.
newChild | The T:System.Xml.XmlNode to add. |
T:System.InvalidOperationException | This node is of a type that does not allow child nodes of the type of the newChild node.The newChild is an ancestor of this node. |
T:System.ArgumentException | The newChild was created from a different document than the one that created this node.This node is read-only. |
Reimplemented from System.Xml.XmlNode.
Definition at line 419 of file XmlAttribute.cs.
|
virtual |
Creates a duplicate of this node.
deep | true to recursively clone the subtree under the specified node; false to clone only the node itself |
Implements System.Xml.XmlNode.
Definition at line 235 of file XmlAttribute.cs.
Inserts the specified node immediately after the specified reference node.
newChild | The T:System.Xml.XmlNode to insert. |
refChild | The T:System.Xml.XmlNode that is the reference node. The newChild is placed after the refChild . |
T:System.InvalidOperationException | This node is of a type that does not allow child nodes of the type of the newChild node.The newChild is an ancestor of this node. |
T:System.ArgumentException | The newChild was created from a different document than the one that created this node.The refChild is not a child of this node.This node is read-only. |
Reimplemented from System.Xml.XmlNode.
Definition at line 335 of file XmlAttribute.cs.
|
virtual |
Inserts the specified node immediately before the specified reference node.
newChild | The T:System.Xml.XmlNode to insert. |
refChild | The T:System.Xml.XmlNode that is the reference node. The newChild is placed before this node. |
T:System.InvalidOperationException | The current node is of a type that does not allow child nodes of the type of the newChild node.The newChild is an ancestor of this node. |
T:System.ArgumentException | The newChild was created from a different document than the one that created this node.The refChild is not a child of this node.This node is read-only. |
Reimplemented from System.Xml.XmlNode.
Definition at line 313 of file XmlAttribute.cs.
Adds the specified node to the beginning of the list of child nodes for this node.
newChild | The T:System.Xml.XmlNode to add. If it is an T:System.Xml.XmlDocumentFragment, the entire contents of the document fragment are moved into the child list of this node. |
T:System.InvalidOperationException | This node is of a type that does not allow child nodes of the type of the newChild node.The newChild is an ancestor of this node. |
T:System.ArgumentException | The newChild was created from a different document than the one that created this node.This node is read-only. |
Reimplemented from System.Xml.XmlNode.
Definition at line 398 of file XmlAttribute.cs.
Removes the specified child node.
oldChild | The T:System.Xml.XmlNode to remove. |
T:System.ArgumentException | The oldChild is not a child of this node. Or this node is read-only. |
Reimplemented from System.Xml.XmlNode.
Definition at line 377 of file XmlAttribute.cs.
|
virtual |
Replaces the child node specified with the new child node specified.
newChild | The new child T:System.Xml.XmlNode. |
oldChild | The T:System.Xml.XmlNode to replace. |
T:System.InvalidOperationException | This node is of a type that does not allow child nodes of the type of the newChild node.The newChild is an ancestor of this node. |
T:System.ArgumentException | The newChild was created from a different document than the one that created this node.This node is read-only.The oldChild is not a child of this node. |
Reimplemented from System.Xml.XmlNode.
Definition at line 357 of file XmlAttribute.cs.
|
virtual |
Saves all the children of the node to the specified T:System.Xml.XmlWriter.
w | The XmlWriter to which you want to save. |
Implements System.Xml.XmlNode.
Definition at line 446 of file XmlAttribute.cs.
|
virtual |
Saves the node to the specified T:System.Xml.XmlWriter.
w | The XmlWriter to which you want to save. |
Implements System.Xml.XmlNode.
Definition at line 437 of file XmlAttribute.cs.
override string System.Xml.XmlAttribute.LocalName => name.LocalName |
Gets the local name of the node.
LocalName
of the attribute is genre
.Definition at line 37 of file XmlAttribute.cs.
override string System.Xml.XmlAttribute.Name => name.Name |
Gets the qualified name of the node.
Definition at line 33 of file XmlAttribute.cs.
override string System.Xml.XmlAttribute.NamespaceURI => name.NamespaceURI |
Gets the namespace URI of this node.
Definition at line 41 of file XmlAttribute.cs.
override XmlNodeType System.Xml.XmlAttribute.NodeType => XmlNodeType.Attribute |
Gets the type of the current node.
XmlAttribute
nodes is XmlNodeType.Attribute.Definition at line 61 of file XmlAttribute.cs.
override XmlDocument System.Xml.XmlAttribute.OwnerDocument => name.OwnerDocument |
Gets the T:System.Xml.XmlDocument to which this node belongs.
Definition at line 65 of file XmlAttribute.cs.
virtual XmlElement System.Xml.XmlAttribute.OwnerElement => parentNode as XmlElement |
Gets the T:System.Xml.XmlElement to which the attribute belongs.
XmlElement
that the attribute belongs to or null
if this attribute is not part of an XmlElement
.Definition at line 126 of file XmlAttribute.cs.
override XmlNode System.Xml.XmlAttribute.ParentNode => null |
Gets the parent of this node. For XmlAttribute
nodes, this property always returns null
.
XmlAttribute
nodes, this property always returns null
.Definition at line 29 of file XmlAttribute.cs.
override IXmlSchemaInfo System.Xml.XmlAttribute.SchemaInfo => name |
Gets the post-schema-validation-infoset that has been assigned to this node as a result of schema validation.
Definition at line 84 of file XmlAttribute.cs.
virtual bool System.Xml.XmlAttribute.Specified => true |
Gets a value indicating whether the attribute value was explicitly set.
true
if this attribute was explicitly given a value in the original instance document; otherwise, false
. A value of false
indicates that the value of the attribute came from the DTD.Definition at line 122 of file XmlAttribute.cs.
|
get |
Gets the base Uniform Resource Identifier (URI) of the node.
BaseURI
returns String.Empty.Definition at line 144 of file XmlAttribute.cs.
|
set |
Sets the concatenated values of the node and all its children.
Definition at line 89 of file XmlAttribute.cs.
|
set |
Sets the value of the attribute.
T:System.Xml.XmlException | The XML specified when setting this property is not well-formed. |
Definition at line 132 of file XmlAttribute.cs.
|
getset |
Gets or sets the namespace prefix of this node.
T:System.ArgumentException | This node is read-only. |
T:System.Xml.XmlException | The specified prefix contains an invalid character.The specified prefix is malformed.The namespaceURI of this node is null .The specified prefix is "xml", and the namespaceURI of this node is different from "http://www.w3.org/XML/1998/namespace".This node is an attribute, the specified prefix is "xmlns", and the namespaceURI of this node is different from "http://www.w3.org/2000/xmlns/".This node is an attribute, and the qualifiedName of this node is "xmlns" [Namespaces]. |
Definition at line 48 of file XmlAttribute.cs.
|
getset |
Gets or sets the value of the node.
XmlAttribute
nodes, this property is the value of attribute.T:System.ArgumentException | The node is read-only and a set operation is called. |
Definition at line 71 of file XmlAttribute.cs.