class: exml::Element


Description:



Constructor and Destructor:

+                                  Element    (void );
+ Element (const std::string & _value);
+ virtual ~Element (void );

Synopsis:

#         std::vector<exml::Node*> m_listSub;
+ size_t size (void ) const;
+ void append (Node* _node);
+ enum nodeType getType (int32_t _id);
+ const enum nodeType getType (int32_t _id) const;
+ Node* getNode (int32_t _id);
+ const Node* getNode (int32_t _id) const;
+ Element* getElement (int32_t _id);
+ const Element* getElement (int32_t _id) const;
+ Element* getNamed (const std::string & _name);
+ const Element* getNamed (const std::string & _name) const;
+ std::string getText (void );
# bool subParse (const std::string & _data,
int32_t & _pos,
bool _caseSensitive,
exml::filePos & _filePos,
exml::Document & _doc,
bool _mainNode);
+ virtual enum nodeType getType (void ) const;
+ virtual bool iParse (const std::string & _data,
int32_t & _pos,
bool _caseSensitive,
exml::filePos & _filePos,
exml::Document & _doc);
+ virtual bool iGenerate (std::string & _data,
int32_t _indent) const;
+ virtual exml::Element* toElement (void );
+ virtual const exml::Element* toElement (void ) const;
+ virtual void clear (void );

Object Hierarchy:

+exml::Node
+--> +exml::AttributeList
+--> exml::Element
+--> exml::Document

Detail:

Element

+  Element (void );
Constructor


Element

+  Element (const std::string & _value);
Constructor


~Element

+ virtual  ~Element (void );
Destructor


m_listSub

# std::vector<exml::Node*> m_listSub;



size

+ size_t size (void ) const;
get the number of sub element in the node (can be exml::Comment ; exml::Element ; exml::Text :exml::Declaration).


append

+ void append (Node* _node);
add a node at the element (not exml::Attribute (move in the attribute automaticly).


getType

+ enum nodeType getType (int32_t _id);
get the type of the element id.


getType

+ const enum nodeType getType (int32_t _id) const;
get the node type.


getNode

+ Node* getNode (int32_t _id);
get the Node pointer of the element id.


getNode

+ const Node* getNode (int32_t _id) const;



getElement

+ Element* getElement (int32_t _id);
get the element casted in Element (if the node is not an element return NULL).


getElement

+ const Element* getElement (int32_t _id) const;



getNamed

+ Element* getNamed (const std::string & _name);
get an element with his name (work only with exml::Element)


getNamed

+ const Element* getNamed (const std::string & _name) const;



getText

+ std::string getText (void );
get the internal data of the element (if the element has some sub node thay are converted in xml string == > like this it is not needed to use <![CDATA[...]]>


subParse

# bool subParse (const std::string & _data,
int32_t & _pos,
bool _caseSensitive,
exml::filePos & _filePos,
exml::Document & _doc,
bool _mainNode);



getType

+ virtual enum nodeType getType (void ) const;
get the node type.


iParse

+ virtual bool iParse (const std::string & _data,
int32_t & _pos,
bool _caseSensitive,
exml::filePos & _filePos,
exml::Document & _doc);
parse the Current node [pure VIRUAL]


iGenerate

+ virtual bool iGenerate (std::string & _data,
int32_t _indent) const;
generate a string with the tree of the xml


toElement

+ virtual exml::Element* toElement (void );
Cast the element in a Element if it is possible.


toElement

+ virtual const exml::Element* toElement (void ) const;
Cast the element in a Element if it is possible.


clear

+ virtual void clear (void );
clear the Node