13 internal int LocalNameHash => name.HashCode;
15 internal XmlName XmlName
33 public override string Name => name.Name;
47 public override string Prefix 70 public override string Value 92 if (PrepareOwnerElementInElementIdAttrMap())
94 string innerText = base.InnerText;
95 base.InnerText = value;
96 ResetOwnerElementInElementIdAttrMap(innerText);
100 base.InnerText = value;
105 internal override bool IsContainer =>
true;
136 XmlLoader xmlLoader =
new XmlLoader();
137 xmlLoader.LoadInnerXmlAttribute(
this, value);
163 return XmlSpace.None;
167 internal override string XmlLang
191 internal override string XPLocalName
195 if (name.Prefix.Length == 0 && name.LocalName ==
"xmlns")
199 return name.LocalName;
203 internal bool IsNamespace =>
Ref.Equal(name.NamespaceURI, name.OwnerDocument.strReservedXmlns);
205 internal XmlAttribute(XmlName name, XmlDocument doc)
211 XmlDocument.CheckName(name.Prefix);
212 XmlDocument.CheckName(name.LocalName);
214 if (name.LocalName.Length == 0)
216 throw new ArgumentException(Res.GetString(
"Xdom_Attr_Name"));
227 : this(doc.AddAttrXmlName(prefix, localName, namespaceURI, null), doc)
239 xmlAttribute.CopyChildren(ownerDocument,
this, deep:
true);
243 internal bool PrepareOwnerElementInElementIdAttrMap()
246 if (ownerDocument.DtdSchemaInfo !=
null)
249 if (ownerElement !=
null)
257 internal void ResetOwnerElementInElementIdAttrMap(
string oldInnerText)
262 internal override XmlNode AppendChildForLoad(XmlNode newChild, XmlDocument doc)
264 XmlNodeChangedEventArgs insertEventArgsForLoad = doc.GetInsertEventArgsForLoad(newChild,
this);
265 if (insertEventArgsForLoad !=
null)
267 doc.BeforeEvent(insertEventArgsForLoad);
269 XmlLinkedNode xmlLinkedNode = (XmlLinkedNode)newChild;
270 if (lastChild ==
null)
272 xmlLinkedNode.next = xmlLinkedNode;
273 lastChild = xmlLinkedNode;
274 xmlLinkedNode.SetParentForLoad(
this);
278 XmlLinkedNode xmlLinkedNode2 = lastChild;
279 xmlLinkedNode.next = xmlLinkedNode2.next;
280 xmlLinkedNode2.next = xmlLinkedNode;
281 lastChild = xmlLinkedNode;
282 if (xmlLinkedNode2.IsText && xmlLinkedNode.IsText)
284 XmlNode.NestTextNodes(xmlLinkedNode2, xmlLinkedNode);
288 xmlLinkedNode.SetParentForLoad(
this);
291 if (insertEventArgsForLoad !=
null)
293 doc.AfterEvent(insertEventArgsForLoad);
295 return xmlLinkedNode;
298 internal override bool IsValidChildType(
XmlNodeType type)
316 if (PrepareOwnerElementInElementIdAttrMap())
320 ResetOwnerElementInElementIdAttrMap(innerText);
338 if (PrepareOwnerElementInElementIdAttrMap())
342 ResetOwnerElementInElementIdAttrMap(innerText);
360 if (PrepareOwnerElementInElementIdAttrMap())
364 ResetOwnerElementInElementIdAttrMap(innerText);
380 if (PrepareOwnerElementInElementIdAttrMap())
384 ResetOwnerElementInElementIdAttrMap(innerText);
401 if (PrepareOwnerElementInElementIdAttrMap())
405 ResetOwnerElementInElementIdAttrMap(innerText);
422 if (PrepareOwnerElementInElementIdAttrMap())
426 ResetOwnerElementInElementIdAttrMap(innerText);
454 internal override void SetParent(
XmlNode node)
override XmlNode PrependChild(XmlNode newChild)
Adds the specified node to the beginning of the list of child nodes for this node.
Represents an XML document. You can use this class to load, validate, edit, add, and position XML in ...
internal XmlAttribute(string prefix, string localName, string namespaceURI, XmlDocument doc)
Initializes a new instance of the T:System.Xml.XmlAttribute class.
override XmlNode RemoveChild(XmlNode oldChild)
Removes the specified child node.
Defines the post-schema-validation infoset of a validated XML node.
override XmlNode InsertBefore(XmlNode newChild, XmlNode refChild)
Inserts the specified node immediately before the specified reference node.
override XmlNode InsertAfter(XmlNode newChild, XmlNode refChild)
Inserts the specified node immediately after the specified reference node.
virtual XmlNode ReplaceChild(XmlNode newChild, XmlNode oldChild)
Replaces the child node oldChild with newChild node.
Represents an attribute. Valid and default values for the attribute are defined in a document type de...
abstract void WriteEndAttribute()
When overridden in a derived class, closes the previous M:System.Xml.XmlWriter.WriteStartAttribute(Sy...
override IXmlSchemaInfo SchemaInfo
Gets the post-schema-validation-infoset that has been assigned to this node as a result of schema val...
void WriteStartAttribute(string localName, string ns)
Writes the start of an attribute with the specified local name and namespace URI.
virtual XmlNode InsertBefore(XmlNode newChild, XmlNode refChild)
Inserts the specified node immediately before the specified reference node.
XmlNodeType
Specifies the type of node.
virtual XmlNode PrependChild(XmlNode newChild)
Adds the specified node to the beginning of the list of child nodes for this node.
override XmlNode CloneNode(bool deep)
Creates a duplicate of this node.
XPathNodeType
Defines the XPath node types that can be returned from the T:System.Xml.XPath.XPathNavigator class.
override string InnerText
Sets the concatenated values of the node and all its children.
override string BaseURI
Gets the base Uniform Resource Identifier (URI) of the node.
Represents a writer that provides a fast, non-cached, forward-only way to generate streams or files t...
override string NamespaceURI
Gets the namespace URI of this node.
virtual bool Specified
Gets a value indicating whether the attribute value was explicitly set.
Gets the node immediately preceding or following this node.
virtual string BaseURI
Gets the base URI of the current node.
override XmlNode ReplaceChild(XmlNode newChild, XmlNode oldChild)
Replaces the child node specified with the new child node specified.
override void WriteContentTo(XmlWriter w)
Saves all the children of the node to the specified T:System.Xml.XmlWriter.
override string InnerXml
Sets the value of the attribute.
XmlAttribute CreateAttribute(string name)
Creates an T:System.Xml.XmlAttribute with the specified P:System.Xml.XmlDocument.Name.
override XmlNode AppendChild(XmlNode newChild)
Adds the specified node to the end of the list of child nodes, of this node.
override string LocalName
Gets the local name of the node.
virtual XmlElement OwnerElement
Gets the T:System.Xml.XmlElement to which the attribute belongs.
virtual XmlNode RemoveChild(XmlNode oldChild)
Removes specified child node.
override XmlNode ParentNode
Gets the parent of this node. For XmlAttribute nodes, this property always returns null.
override void WriteTo(XmlWriter w)
Saves the node to the specified T:System.Xml.XmlWriter.
virtual XmlNode FirstChild
Gets the first child of the node.
virtual XmlNode AppendChild(XmlNode newChild)
Adds the specified node to the end of the list of child nodes, of this node.
virtual XmlNode NextSibling
Gets the node immediately following this node.
virtual void RemoveAll()
Removes all the child nodes and/or attributes of the current node.
XmlSpace
Specifies the current xml:space scope.
override XmlNodeType NodeType
Gets the type of the current node.
virtual XmlNode InsertAfter(XmlNode newChild, XmlNode refChild)
Inserts the specified node immediately after the specified reference node.
override string Value
Gets or sets the value of the node.
override XmlDocument OwnerDocument
Gets the T:System.Xml.XmlDocument to which this node belongs.
override string Prefix
Gets or sets the namespace prefix of this node.
override string Name
Gets the qualified name of the node.
override XmlAttributeCollection Attributes
Gets an T:System.Xml.XmlAttributeCollection containing the list of attributes for this node.
Represents a single node in the XML document.