|
| XMLElement () |
|
| XMLElement (const String &name, const XMLAttributeList &attributes=XMLAttributeList()) |
|
| XMLElement (const XMLElement &)=delete |
|
| XMLElement (XMLElement &parent, const String &name, const XMLAttributeList &attributes=XMLAttributeList()) |
|
| ~XMLElement () override |
|
void | AddChildNode (XMLNode *node) |
|
void | AddChildNodes (XMLNodeList &nodes) |
|
XMLAttributeList | Attributes () const |
|
String | AttributeValue (const String &name) const |
|
iterator | Begin () |
|
iterator | begin () |
|
const_iterator | Begin () const |
|
const_iterator | begin () const |
|
int | ChildCount () const |
|
child_element_list | ChildElements (bool recursive=false) const |
|
child_element_list | ChildElementsByName (const String &name, bool recursive=false) const |
|
XMLNodeList | ChildNodesByType (XMLNodeTypes types, bool recursive=false) const |
|
template<class UP > |
XMLNodeList | ChildNodesThat (UP u, bool recursive=false) const |
|
void | ClearAttributes () |
|
const_iterator | ConstBegin () const |
|
const_iterator | ConstEnd () const |
|
void | DestroyChildNodes () |
|
iterator | End () |
|
iterator | end () |
|
const_iterator | End () const |
|
const_iterator | end () const |
|
const XMLNode & | First () const |
|
bool | HasAttribute (const String &name) const |
|
bool | HasAttributes () const |
|
bool | HasCDATA () const |
|
bool | HasChildElementWithName (const String &name, bool recursive=false) const |
|
template<class UP > |
bool | HasChildNodeThat (UP u, bool recursive=false) const |
|
bool | HasComments () const |
|
bool | HasElements () const |
|
bool | HasProcessingInstructions () const |
|
bool | HasText () const |
|
bool | IsEmpty () const |
|
bool | IsRootElement () const |
|
const XMLNode & | Last () const |
|
const String & | Name () const |
|
XMLElement & | operator<< (const XMLAttribute &attribute) |
|
XMLElement & | operator<< (const XMLAttributeList &list) |
|
XMLElement & | operator<< (XMLNode *node) |
|
XMLElement & | operator<< (XMLNodeList &nodes) |
|
XMLElement & | operator= (const XMLElement &)=delete |
|
const XMLNode & | operator[] (int i) const |
|
void | ParseAttributes (const String &text) |
|
XMLNodeList | ReleaseChildNodes () |
|
void | RemoveAttribute (const String &name) |
|
void | Serialize (IsoString &text, bool autoFormat, char indentChar, unsigned indentSize, unsigned level) const override |
|
void | SerializeAsHTML (IsoString &text, bool autoFormat, char indentChar, unsigned indentSize, unsigned level) const override |
|
void | SerializeAttributes (IsoString &text) const |
|
void | SetAttribute (const String &name, const String &value) |
|
void | SetAttribute (const XMLAttribute &attribute) |
|
void | SetAttributes (const XMLAttributeList &list) |
|
void | SortAttributes () |
|
template<class BP > |
void | SortAttributes (BP p) |
|
String | Text () const |
|
| XMLNode (const XMLNode &x) |
|
| XMLNode (node_type type) |
|
| ~XMLNode () override |
|
bool | IsChildNode () const |
|
bool | IsComment () const |
|
bool | IsElement () const |
|
bool | IsText () const |
|
const XMLNodeLocation & | Location () const |
|
virtual bool | NLAfter (const XMLNode &previous) const |
|
node_type | NodeType () const |
|
| XMLComponent ()=default |
|
| XMLComponent (const XMLComponent &)=default |
|
virtual | ~XMLComponent () |
|
bool | IsTopLevel () const |
|
XMLElement * | ParentElement () const |
|
The XMLElement class represents an XML document element:
https://www.w3.org/TR/xml11/#dt-element
Elements are the main data holders in the logical design of XML, following a hierarchical tree structure.
Definition at line 1161 of file XML.h.
template<class UP >
XMLNodeList pcl::XMLElement::ChildNodesThat |
( |
UP |
u, |
|
|
bool |
recursive = false |
|
) |
| const |
|
inline |
Returns a list with all child nodes of this element that satisfy the specified unary predicate u.
For each child node n in this element, n will be included in the returned list iff u( n ) returns true.
if recursive is true
, this member function performs a recursive search across the entire tree structure rooted at this element. Otherwise only the direct descendant nodes will be returned.
Definition at line 1777 of file XML.h.
bool pcl::XMLElement::HasChildElementWithName |
( |
const String & |
name, |
|
|
bool |
recursive = false |
|
) |
| const |
|
inline |
Returns true iff this element has at least one child element with the specified name.
if recursive is true
, this member function performs a recursive search across the entire tree structure rooted at this element. Otherwise only the direct descendant elements will be checked.
Definition at line 1703 of file XML.h.
References HasChildElementWithName(), and Name().
Referenced by HasChildElementWithName().
bool pcl::XMLElement::IsRootElement |
( |
| ) |
const |
|
inline |
Returns true iff this is a root XML element. A root XML element has no parent element.
Note that this member function can return true in two different situations: when the element has been generated during a document parsing process (in which case this is an actual document root element), and if this object has not been initialized yet (because it has been newly constructed and still has not been associated with an XML document).
Definition at line 1244 of file XML.h.
void pcl::XMLElement::ParseAttributes |
( |
const String & |
text | ) |
|
|
inline |
Parses the specified text, encoded as UTF-16, to generate a new list of attributes in this XML element. The previous list of attributes, if any, will be replaced by the newly generated list.
The specified text must be a sequence of zero or more Attribute XML definitions pertaining to a start-tag, as described in the W3C recommendation:
https://www.w3.org/TR/xml11/#NT-STag
Definition at line 1419 of file XML.h.
Releases the child nodes of this XML element.
This function returns the (possibly empty) list of child nodes in this element and causes this object to forget them. The caller will be responsible for destroying and deallocating all of the returned nodes as appropriate. After calling this member function, this XML element will be empty.
Definition at line 1890 of file XML.h.
References pcl::ReferenceArray< T, A >::Clear().
void pcl::XMLElement::SerializeAttributes |
( |
IsoString & |
text | ) |
const |
|
inline |
Performs the XML serialization of the attribute list in this element and appends it to the specified text string, encoded in UTF-8.
The generated serialization is a sequence of zero or more Attribute XML definitions pertaining to a start-tag, as described in the W3C recommendation:
https://www.w3.org/TR/xml11/#NT-STag
Definition at line 1436 of file XML.h.
void pcl::XMLElement::SetAttribute |
( |
const String & |
name, |
|
|
const String & |
value |
|
) |
| |
|
inline |
Causes this XML element to contain an attribute with the specified qualified name and value.
If an attribute with the same qualified name already exists in this element, then its value will be changed. Otherwise, a new attribute will be created in this element.
This member function ensures that no XML element can have two or more attributes with the same qualified name. This constraint is part of the XML specification:
https://www.w3.org/TR/xml11/#sec-starttags https://www.w3.org/TR/xml-names/#scoping-defaulting
Definition at line 1307 of file XML.h.
Causes this XML element to contain the specified list of attributes.
For each attribute in the specified list, if an attribute with the same qualified name already exists in this element, then its value will be changed. Otherwise, a new attribute will be created in this element.
This member function ensures that no XML element can have two or more attributes with the same qualified name. This constraint is part of the XML specification:
https://www.w3.org/TR/xml11/#sec-starttags https://www.w3.org/TR/xml-names/#scoping-defaulting
Definition at line 1352 of file XML.h.