XmlElement
XmlElement
概要
XmlElement は Aspose.Cells の C++ 用 FOSS に含まれるクラスです。
軽量な XML 要素へのハンドルです。デフォルト構築されたインスタンスは null です。
このクラスは C++ プログラムで XmlElement オブジェクトを操作するための 16 のメソッドを提供します。利用可能なメソッドは AddChild、GetAttribute、GetAttributes、GetChildNodes、GetDescendantsAndSelf、GetElement、GetElements、GetName、GetValue、IsNull、IsTextNode、MakeElement、および追加の 1 メソッドです。Aspose.Cells の C++ 用 FOSS パッケージをインストールすれば、すべての public メンバーは任意の C++ アプリケーションから利用可能です。
メソッド
| シグネチャ | 説明 |
|---|---|
IsNull() → bool | null が設定されている場合に true を返します。 |
GetName() → std::string | Clark表記 {uri}localname の修飾名を取得します。 |
GetValue() → std::string | すべての子孫テキストノードの連結されたテキストを取得します。 |
IsTextNode() → bool | このノードが要素ではなくテキストノードである場合に true を返します。 |
GetAttributes() → std::vector<std::pair<std::string, std::string>> | ローカル名/値のペアとしてすべての属性を取得します。 |
GetChildNodes() → std::vector<XmlElement> | 直接の子ノード(要素とテキストノード)を取得します。 |
GetAttribute(localName: std::string_view) → XmlAttribute | ローカル名で属性を取得します。見つからない場合は null XmlAttribute を返します。 |
GetElements(qualifiedName: std::string_view) → std::vector<XmlElement> | 指定された修飾名を持つすべての直接子要素を取得します。 |
GetElement(qualifiedName: std::string_view) → XmlElement | 指定された修飾名を持つ最初の直接子要素を取得します。 |
GetDescendantsAndSelf() → std::vector<XmlElement> | 自身を含むすべての子孫要素を文書順で取得します。 |
MakeElement(node: std::shared_ptr<XmlNodeData>) → XmlElement | この XmlElement インスタンスで MakeElement を呼び出します。 |
MakeElement(qualifiedName: std::string) → XmlElement | 指定された完全修飾名で属性や子要素のない新しい要素を作成します。 |
MakeElement(qualifiedName: std::string, attributes: std::vector<std::pair<std::string, std::string>>, children: std::vector<XmlElement>) → XmlElement | 指定された完全修飾名、属性、子要素を持つ新しい要素を作成します。 |
AddChild(child: XmlElement) | この要素に子要素を追加します。 |
AddChild(child: XmlElement) | 子要素を移動して追加します。 |
SetAttribute(localName: std::string_view, value: std::string) | 属性値を設定します。存在しない場合は追加し、存在する場合は更新します。 |