27 parent->m_siblings.push_back (
this);
42 parent->m_siblings.push_back (
this);
56 for (sit = m_siblings.begin (); sit != m_siblings.end (); ++sit)
71 return (m_attributes);
91 return (m_siblings.size ());
96 m_it = m_siblings.begin ();
97 if (m_it == m_siblings.end ())
return (0);
103 if (m_it == m_siblings.end ())
return (0);
105 if (m_it == m_siblings.end ())
return (0);
114 std::cout <<
header << std::endl;
119 if (
m_type == COMMENT_NODE)
121 for (
i = 0;
i <
depth;
i++) std::cout <<
" ";
122 std::cout <<
"<!--" << m_value <<
"-->" << std::endl;
131 for (
i = 0;
i <
depth;
i++) std::cout <<
" ";
132 std::cout <<
"<" <<
m_name;
134 std::map <std::string, std::string>::const_iterator ait;
136 for (ait = m_attributes.begin (); ait != m_attributes.end (); ++ait)
138 const std::string&
n = (*ait).first;
139 const std::string&
v = (*ait).second;
141 std::cout <<
" " <<
n <<
"='" <<
v <<
"'";
144 std::cout <<
">" << std::endl;
146 DOMSiblings::const_iterator sit;
148 for (sit = m_siblings.begin (); sit != m_siblings.end (); ++sit)
155 for (
i = 0;
i <
depth;
i++) std::cout <<
" ";
156 std::cout <<
"</" <<
m_name <<
">" << std::endl;