System::Xml::XmlDocument::CreateAttribute method
Contents
[
Hide
]XmlDocument::CreateAttribute(const String&) method
Creates an XmlAttribute with the specified name.
SharedPtr<XmlAttribute> System::Xml::XmlDocument::CreateAttribute(const String &name)
Parameter | Type | Description |
---|---|---|
name | const String& | The qualified name of the attribute. If the name contains a colon, the XmlNode::get_Prefix value reflects the part of the name preceding the first colon and the XmlDocument::get_LocalName value reflects the part of the name following the first colon. The XmlNode::get_NamespaceURI remains empty unless the prefix is a recognized built-in prefix such as xmlns. In this case get_NamespaceURI has a value of http://www.w3.org/2000/xmlns/. |
ReturnValue
The new XmlAttribute.
See Also
- Typedef SharedPtr
- Class XmlAttribute
- Class String
- Class XmlDocument
- Namespace System::Xml
- Library Aspose.Page for C++
XmlDocument::CreateAttribute(const String&, const String&, const String&) method
Creates an XmlAttribute with the specified XmlNode::get_Prefix, XmlDocument::get_LocalName, and XmlNode::get_NamespaceURI.
virtual SharedPtr<XmlAttribute> System::Xml::XmlDocument::CreateAttribute(const String &prefix, const String &localName, const String &namespaceURI)
Parameter | Type | Description |
---|---|---|
prefix | const String& | The prefix of the attribute (if any). String::Empty and nullptr are equivalent. |
localName | const String& | The local name of the attribute. |
namespaceURI | const String& | The namespace URI of the attribute (if any). String::Empty and nullptr are equivalent. If prefix is xmlns, then this parameter must be http://www.w3.org/2000/xmlns/; otherwise an exception is thrown. |
ReturnValue
The new XmlAttribute.
See Also
- Typedef SharedPtr
- Class XmlAttribute
- Class String
- Class XmlDocument
- Namespace System::Xml
- Library Aspose.Page for C++
XmlDocument::CreateAttribute(const String&, const String&) method
Creates an XmlAttribute with the specified qualified name and XmlNode::get_NamespaceURI.
SharedPtr<XmlAttribute> System::Xml::XmlDocument::CreateAttribute(const String &qualifiedName, const String &namespaceURI)
Parameter | Type | Description |
---|---|---|
qualifiedName | const String& | The qualified name of the attribute. If the name contains a colon then the XmlNode::get_Prefix value will reflect the part of the name preceding the colon and the XmlDocument::get_LocalName value will reflect the part of the name after the colon. |
namespaceURI | const String& | The namespaceURI of the attribute. If the qualified name includes a prefix of xmlns, then this parameter must be http://www.w3.org/2000/xmlns/. |
ReturnValue
The new XmlAttribute.
See Also
- Typedef SharedPtr
- Class XmlAttribute
- Class String
- Class XmlDocument
- Namespace System::Xml
- Library Aspose.Page for C++