System::Xml::XmlElement::SetAttributeNode method

XmlElement::SetAttributeNode(SharedPtr<XmlAttribute>) method

يضيف XmlAttribute المحدد.

virtual SharedPtr<XmlAttribute> System::Xml::XmlElement::SetAttributeNode(SharedPtr<XmlAttribute> newAttr)
ParameterTypeالوصف
newAttrSharedPtr<XmlAttribute>العقدة XmlAttribute لإضافتها إلى مجموعة السمات لهذا العنصر.

ReturnValue

إذا استبدلت السمة سمة موجودة بنفس الاسم، يتم إرجاع XmlAttribute القديمة؛ وإلا، يتم إرجاع nullptr.

انظر أيضًا

XmlElement::SetAttributeNode(String, String) method

يضيف XmlAttribute المحدد.

virtual SharedPtr<XmlAttribute> System::Xml::XmlElement::SetAttributeNode(String localName, String namespaceURI)
ParameterTypeالوصف
localNameStringالاسم المحلي للسمة.
namespaceURIStringمسار مساحة الاسم للسمة.

ReturnValue

الـ XmlAttribute للإضافة.

انظر أيضًا