12#ifdef HAPI_USE_PUGIXML
22 m_node( pugi::xml_node() ) {
41PugiXMLNode::PugiXMLNode(
const PugiXMLNode &other) :
42 Node_internal( other ),
43 m_node( other.m_node ) {
49PugiXMLNode::~PugiXMLNode( ) {
60std::string PugiXMLNode::attribute(
char const *a_name) {
64 return std::string(attr.
value( ));
69int PugiXMLNode::attribute_as_int(
const char* a_name){
72 return atoi(attr.
value( ));
74long PugiXMLNode::attribute_as_long(
const char* a_name){
77 return atol(attr.
value( ));
79double PugiXMLNode::attribute_as_double(
const char* a_name){
82 return atof(attr.
value( ));
92Node_internal *PugiXMLNode::child(
char const *a_name) {
94 return new PugiXMLNode( m_node.child( a_name ) );
100Node_internal *PugiXMLNode::first_child() {
102 return new PugiXMLNode( m_node.first_child( ) );
112Node_internal *PugiXMLNode::next_sibling() {
114 return new PugiXMLNode( m_node.next_sibling( ) );
124void PugiXMLNode::to_next_sibling() {
126 m_node = m_node.next_sibling( );
136Node_internal *PugiXMLNode::copy() {
138 return new PugiXMLNode( m_node );
146Node_internal &PugiXMLNode::operator=(
const PugiXMLNode &other) {
148 this->m_node = other.m_node;
159std::string PugiXMLNode::name()
const {
161 return std::string(m_node.name());
171bool PugiXMLNode::empty()
const {
173 return m_node.empty();
183Text PugiXMLNode::text()
const {
185 return Text( std::string(m_node.text().get()) );
195Data_internal *PugiXMLNode::data()
const {
197 return new PugiXMLData( m_node );
const char_t * value() const