Adds a XmlNode using its Name property
[Visual Basic] Overrides Public Function SetNamedItem( _ ByVal node As XmlNode _ ) As XmlNode [C#] public override XmlNode SetNamedItem( XmlNode node ); [C++] public: override XmlNode* SetNamedItem( XmlNode* node ); [JScript] public override function SetNamedItem( node : XmlNode ) : XmlNode;
If the node replaces an existing node with the same name, the old node is returned; otherwise, null is returned.
Exception Type | Condition |
---|---|
WRONG_DOCUMENT_ERR | node was created from a different XmlDocument than the one that created this XmlNamedNodeMap. |
NO_MODIFICATION_ALLOWED_ERR | This XmlNamedNodeMap is readonly. |
INUSE_ATTRIBUTE_ERR | node is an XmlAttribute that is already an attribute of another XmlElement object. To re-use attributes in other elements, you must clone the XmlAttribute objects you want to re-use. |
XmlAttributeCollection Class | XmlAttributeCollection Members | System.NewXml Namespace