System::Xml::XmlDocument::CreateAttribute メソッド

XmlDocument::CreateAttribute(const String&) method

指定された名前の XmlAttribute を作成します。

SharedPtr<XmlAttribute> System::Xml::XmlDocument::CreateAttribute(const String &name)
パラメーター説明
nameconst String&属性の修飾名です。名前にコロンが含まれる場合、XmlNode::get_Prefix の値は最初のコロンの前の部分を、XmlDocument::get_LocalName の値は最初のコロンの後の部分を表します。XmlNode::get_NamespaceURI は、プレフィックスが xmlns のような認識された組み込みプレフィックスでない限り空のままです。この場合、get_NamespaceURI の値は http://www.w3.org/2000/xmlns/ になります。

ReturnValue

新しい XmlAttribute

参照

XmlDocument::CreateAttribute(const String&, const String&, const String&) method

指定された XmlNode::get_PrefixXmlDocument::get_LocalName および XmlNode::get_NamespaceURI を使用して XmlAttribute を作成します。

virtual SharedPtr<XmlAttribute> System::Xml::XmlDocument::CreateAttribute(const String &prefix, const String &localName, const String &namespaceURI)
パラメーター説明
prefixconst String&属性のプレフィックス(存在する場合)。String::Emptynullptr は同等です。
localNameconst String&属性のローカル名。
namespaceURIconst String&属性の名前空間 URI(存在する場合)。String::Emptynullptr は同等です。prefixxmlns の場合、このパラメーターは http://www.w3.org/2000/xmlns/; でなければならず、そうでない場合は例外がスローされます。

ReturnValue

新しい XmlAttribute

参照

XmlDocument::CreateAttribute(const String&, const String&) method

指定された修飾名と XmlNode::get_NamespaceURI を使用して XmlAttribute を作成します。

SharedPtr<XmlAttribute> System::Xml::XmlDocument::CreateAttribute(const String &qualifiedName, const String &namespaceURI)
パラメーター説明
qualifiedNameconst String&属性の修飾名です。名前にコロンが含まれる場合、XmlNode::get_Prefix の値はコロンの前の部分を、XmlDocument::get_LocalName の値はコロンの後の部分を表します。
namespaceURIconst String&属性の namespaceURI です。修飾名に xmlns のプレフィックスが含まれる場合、このパラメーターは http://www.w3.org/2000/xmlns/ でなければなりません。

ReturnValue

新しい XmlAttribute

参照