2 #include <boost/algorithm/string.hpp>
22 return (this->
node->name());
27 bool retvalue =
false;
28 for(rapidxml::xml_node<char> * nextElement = this->
node->next_sibling();
29 ; nextElement = nextElement->next_sibling())
31 if (nextElement == NULL)
break;
32 else if (nextElement->type() == rapidxml::node_element)
43 bool retvalue =
false;
44 rapidxml::xml_node<char> * nextElement = this->
node->first_node();
45 if (nextElement != NULL)
47 for(;;nextElement = nextElement->next_sibling())
49 if (nextElement == NULL)
break;
50 else if (nextElement->type() == rapidxml::node_element)
63 bool retvalue =
false;
81 bool retvalue =
false;
83 rapidxml::xml_node<char> * nextElement = this->
node->first_node();
84 while (nextElement != NULL)
86 if (nextElement->type() == rapidxml::node_data) content=content+std::string(nextElement->value(),nextElement->value_size());
87 nextElement = nextElement->next_sibling();
89 boost::algorithm::replace_all(content,
"\n",
" ") ;
90 boost::algorithm::trim(content) ;
91 if (content.size()==0)
return false ;
97 return (CXMLNode::RootName);
103 rapidxml::xml_attribute<char> *currentAttr = NULL;
105 if ((currentAttr = this->
node->first_attribute()) != NULL)
109 attributes.insert(std::pair<StdString, StdString>
112 }
while ((currentAttr = currentAttr->next_attribute()) != NULL);
115 return (attributes) ;
StdString getElementName(void) const
Accesseurs ///.
bool goToParentElement(void)
bool getContent(StdString &content)
CXMLNode(void)
Constructeurs ///.
static const StdString & GetRootName(void)
Accesseurs statiques ///.
static StdString RootName
////////////////////// Définitions ////////////////////// ///
bool goToNextElement(void)
Mutateurs ///.
rapidxml::xml_node< char > * node
std::map< StdString, StdString > THashAttributes
////////////////////// Déclarations ////////////////////// ///
~CXMLNode(void)
Destructeur ///.
THashAttributes getAttributes(void) const
bool goToChildElement(void)