XmlElement

Vue de l’ensemble

‘XmlElement’ est une classe dans Aspose.Cells FOSS pour C++.

Lightweight traite un élément XML. Les instances de conception par défaut sont null.

Cette classe fournit 16 méthodes pour travailler avec des objets XmlElement dans les programmes C++. Les méthodologies disponibles comprennent: ‘AddChild’, ‘GetAttribute’, GatAtributes', ‘GitChildeNodes’, 'DescendantsAndSelf', ’GtElements', ‚GotName, ‘BigValue’, ‘‘IsNull , 'IsTextNode et 1 méthode supplémentaire. Tous les membres publics sont accessibles à toute application C ++ après l’installation de l’Aspouse.Cells FOSS pour le package C+.

méthodes

SignatureDescription
IsNull()boolReturns true if null is set.
GetName()std::stringGets the qualified name in Clark notation {uri}localname.
GetValue()std::stringGets the concatenated text of all descendant text nodes.
IsTextNode()boolReturns true if this node represents a text node rather than an element.
GetAttributes()std::vector<std::pair<std::string, std::string>>Gets all attributes as local-name/value pairs.
GetChildNodes()std::vector<XmlElement>Gets all direct child nodes (elements and text nodes).
GetAttribute(localName: std::string_view)XmlAttributeGets an attribute by local name. Returns a null XmlAttribute if not found.
GetElements(qualifiedName: std::string_view)std::vector<XmlElement>Gets all direct child elements with the given qualified name.
GetElement(qualifiedName: std::string_view)XmlElementGets the first direct child element with the given qualified name.
GetDescendantsAndSelf()std::vector<XmlElement>Gets all descendant elements including self, in document order.
MakeElement(node: std::shared_ptr<XmlNodeData>)XmlElementCalls MakeElement on this XmlElement instance.
MakeElement(qualifiedName: std::string)XmlElementCreates a new element with the given qualified name and no attributes or children.
MakeElement(qualifiedName: std::string, attributes: std::vector<std::pair<std::string, std::string>>, children: std::vector<XmlElement>)XmlElementCreates a new element with the given qualified name, attributes, and child elements.
AddChild(child: XmlElement)Adds a child element to this element.
AddChild(child: XmlElement)Adds a child element by moving.
SetAttribute(localName: std::string_view, value: std::string)Sets an attribute value, adding it if absent or updating if present.

Voir aussi

  • Aspose.Cells — référence API d’entreprise
 Français