<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>libxml++: xmlpp::Element Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.8 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespacexmlpp.html">xmlpp</a>::<a class="el" href="classxmlpp_1_1Element.html">Element</a> </div> </div> <div class="contents"> <h1>xmlpp::Element Class Reference</h1><!-- doxytag: class="xmlpp::Element" --><!-- doxytag: inherits="xmlpp::Node" --><a class="el" href="classxmlpp_1_1Element.html" title="Element nodes have attributes as well as child nodes.">Element</a> nodes have attributes as well as child nodes. <a href="#_details">More...</a> <p> <div class="dynheader"> Inheritance diagram for xmlpp::Element:</div> <div class="dynsection"> <p><center><img src="classxmlpp_1_1Element__inherit__graph.jpg" border="0" usemap="#xmlpp_1_1Element__inherit__map" alt="Inheritance graph"></center> <map name="xmlpp_1_1Element__inherit__map"> <area shape="rect" href="classxmlpp_1_1Node.html" title="Represents XML Nodes." alt="" coords="29,80,123,107"><area shape="rect" href="classxmlpp_1_1NonCopyable.html" title="Herited by classes which cannot be copied." alt="" coords="5,5,147,32"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <a href="classxmlpp_1_1Element-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Types</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="elRef" doxygen="libstdc++.tag.xml:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/classstd_1_1list.html">std::list</a>< <a class="el" href="classxmlpp_1_1Attribute.html">Attribute</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#7c54c83af3dfeddf2a70dba5ca6cc1d1">AttributeList</a></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#ddce07f26b8ca52beb583d942375a756">Element</a> (_xmlNode *node)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#6633bfbb6b3b6520ab9ac8fa4991b066">~Element</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#801e28a85e4c45d145d056c5ff7186f3">set_namespace_declaration</a> (const Glib::ustring &ns_uri, const Glib::ustring &ns_prefix=Glib::ustring())</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">This adds a namespace declaration to this node which will apply to this node and all children. <a href="#801e28a85e4c45d145d056c5ff7186f3"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="libstdc++.tag.xml:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/classstd_1_1list.html">AttributeList</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#8fbb85e7ecabc5a8b9b39638f94e4fb7">get_attributes</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Obtain the list of attributes for this element. <a href="#8fbb85e7ecabc5a8b9b39638f94e4fb7"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="elRef" doxygen="libstdc++.tag.xml:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/classstd_1_1list.html">AttributeList</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#fc9883eee2a4fb0584a60b21b5d2673b">get_attributes</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Obtain the list of attributes for this element. <a href="#fc9883eee2a4fb0584a60b21b5d2673b"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classxmlpp_1_1Attribute.html">Attribute</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#21fcf0bb1ee913fb698d2ab8911dda77">get_attribute</a> (const Glib::ustring &name, const Glib::ustring &ns_prefix=Glib::ustring()) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">Glib::ustring </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#8ae47935bca05ac2a6f0d8b02221a6b1">get_attribute_value</a> (const Glib::ustring &name, const Glib::ustring &ns_prefix=Glib::ustring()) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the value of the attribute with this name, and optionally with this namespace. <a href="#8ae47935bca05ac2a6f0d8b02221a6b1"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classxmlpp_1_1Attribute.html">Attribute</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#359b10f76db129fff5776c8405ac8e9a">set_attribute</a> (const Glib::ustring &name, const Glib::ustring &value, const Glib::ustring &ns_prefix=Glib::ustring())</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the value of the attribute with this name, and optionally with this namespace. <a href="#359b10f76db129fff5776c8405ac8e9a"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#3d5765f07699dc8d4d55c0b0157defad">remove_attribute</a> (const Glib::ustring &name, const Glib::ustring &ns_prefix=Glib::ustring())</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Remove the attribute with this name, and optionally with this namespace. <a href="#3d5765f07699dc8d4d55c0b0157defad"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classxmlpp_1_1TextNode.html">TextNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#71885eacc99a1e7812b47d3d0607423a">get_child_text</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the first child text content node. <a href="#71885eacc99a1e7812b47d3d0607423a"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classxmlpp_1_1TextNode.html">TextNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#0a2326904a79f2e2abb5c91a4107fa6f">get_child_text</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the first child text content node. <a href="#0a2326904a79f2e2abb5c91a4107fa6f"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classxmlpp_1_1TextNode.html">TextNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#15cd56e871aaf9625b7f4fbedb97c764">add_child_text</a> (const Glib::ustring &content=Glib::ustring())</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Append a new text node. <a href="#15cd56e871aaf9625b7f4fbedb97c764"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classxmlpp_1_1TextNode.html">TextNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#f774512e6c39e8e6741a0ff7bf9250f5">add_child_text</a> (<a class="el" href="classxmlpp_1_1Node.html">xmlpp::Node</a> *previous_sibling, const Glib::ustring &content=Glib::ustring())</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Add a new text node after the specified existing child node. <a href="#f774512e6c39e8e6741a0ff7bf9250f5"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classxmlpp_1_1TextNode.html">TextNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#a05dee4b080f6e3c709397a48ad2a34e">add_child_text_before</a> (<a class="el" href="classxmlpp_1_1Node.html">xmlpp::Node</a> *next_sibling, const Glib::ustring &content=Glib::ustring())</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Add a new text node before the specified existing child node. <a href="#a05dee4b080f6e3c709397a48ad2a34e"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#9be4234049fe13f2941d9c7a5dbc37e2">set_child_text</a> (const Glib::ustring &content)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the text of the first text node, adding one if necessary. <a href="#9be4234049fe13f2941d9c7a5dbc37e2"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classbool.html">bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#40d1299122bd9921fcb544ca1236aa95">has_child_text</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Discover whether one of the child nodes is a text node. <a href="#40d1299122bd9921fcb544ca1236aa95"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classxmlpp_1_1CommentNode.html">CommentNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#f69479710a4ab4cd8e89703a20dd360e">add_child_comment</a> (const Glib::ustring &content)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Append a new comment node. <a href="#f69479710a4ab4cd8e89703a20dd360e"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">Glib::ustring </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Element.html#f4c996b3eed332ed7e4e3096427e624d">get_namespace_uri_for_prefix</a> (const Glib::ustring &ns_prefix) const </td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> <a class="el" href="classxmlpp_1_1Element.html" title="Element nodes have attributes as well as child nodes.">Element</a> nodes have attributes as well as child nodes. <p> This will be instantiated by the parser. <hr><h2>Member Typedef Documentation</h2> <a class="anchor" name="7c54c83af3dfeddf2a70dba5ca6cc1d1"></a><!-- doxytag: member="xmlpp::Element::AttributeList" ref="7c54c83af3dfeddf2a70dba5ca6cc1d1" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef <a class="elRef" doxygen="libstdc++.tag.xml:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/classstd_1_1list.html">std::list</a><<a class="el" href="classxmlpp_1_1Attribute.html">Attribute</a>*> <a class="elRef" doxygen="libstdc++.tag.xml:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/classstd_1_1list.html">xmlpp::Element::AttributeList</a> </td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="ddce07f26b8ca52beb583d942375a756"></a><!-- doxytag: member="xmlpp::Element::Element" ref="ddce07f26b8ca52beb583d942375a756" args="(_xmlNode *node)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">xmlpp::Element::Element </td> <td>(</td> <td class="paramtype">_xmlNode * </td> <td class="paramname"> <em>node</em> </td> <td> ) </td> <td><code> [explicit]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="6633bfbb6b3b6520ab9ac8fa4991b066"></a><!-- doxytag: member="xmlpp::Element::~Element" ref="6633bfbb6b3b6520ab9ac8fa4991b066" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual xmlpp::Element::~Element </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="f69479710a4ab4cd8e89703a20dd360e"></a><!-- doxytag: member="xmlpp::Element::add_child_comment" ref="f69479710a4ab4cd8e89703a20dd360e" args="(const Glib::ustring &content)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classxmlpp_1_1CommentNode.html">CommentNode</a>* xmlpp::Element::add_child_comment </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>content</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Append a new comment node. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>content</em> </td><td>The text. This should be unescaped - see <a class="el" href="classxmlpp_1_1ContentNode.html#2e9978caa82eb11cadccd4d5fc4e690a" title="Set the text of this content node.">ContentNode::set_content()</a>. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The new comment node. </dd></dl> </div> </div><p> <a class="anchor" name="f774512e6c39e8e6741a0ff7bf9250f5"></a><!-- doxytag: member="xmlpp::Element::add_child_text" ref="f774512e6c39e8e6741a0ff7bf9250f5" args="(xmlpp::Node *previous_sibling, const Glib::ustring &content=Glib::ustring())" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classxmlpp_1_1TextNode.html">TextNode</a>* xmlpp::Element::add_child_text </td> <td>(</td> <td class="paramtype"><a class="el" href="classxmlpp_1_1Node.html">xmlpp::Node</a> * </td> <td class="paramname"> <em>previous_sibling</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>content</em> = <code>Glib::ustring()</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Add a new text node after the specified existing child node. <p> <dl compact><dt><b><a class="el" href="newin2p24s.html#_newin2p24s000001">Since libxml++ 2.24:</a></b></dt><dd></dd></dl> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>previous_sibling</em> </td><td>An existing child node. </td></tr> <tr><td valign="top"></td><td valign="top"><em>content</em> </td><td>The text. This should be unescaped - see <a class="el" href="classxmlpp_1_1ContentNode.html#2e9978caa82eb11cadccd4d5fc4e690a" title="Set the text of this content node.">ContentNode::set_content()</a>. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The new text node. </dd></dl> </div> </div><p> <a class="anchor" name="15cd56e871aaf9625b7f4fbedb97c764"></a><!-- doxytag: member="xmlpp::Element::add_child_text" ref="15cd56e871aaf9625b7f4fbedb97c764" args="(const Glib::ustring &content=Glib::ustring())" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classxmlpp_1_1TextNode.html">TextNode</a>* xmlpp::Element::add_child_text </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>content</em> = <code>Glib::ustring()</code> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Append a new text node. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>content</em> </td><td>The text. This should be unescaped - see <a class="el" href="classxmlpp_1_1ContentNode.html#2e9978caa82eb11cadccd4d5fc4e690a" title="Set the text of this content node.">ContentNode::set_content()</a>. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The new text node. </dd></dl> </div> </div><p> <a class="anchor" name="a05dee4b080f6e3c709397a48ad2a34e"></a><!-- doxytag: member="xmlpp::Element::add_child_text_before" ref="a05dee4b080f6e3c709397a48ad2a34e" args="(xmlpp::Node *next_sibling, const Glib::ustring &content=Glib::ustring())" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classxmlpp_1_1TextNode.html">TextNode</a>* xmlpp::Element::add_child_text_before </td> <td>(</td> <td class="paramtype"><a class="el" href="classxmlpp_1_1Node.html">xmlpp::Node</a> * </td> <td class="paramname"> <em>next_sibling</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>content</em> = <code>Glib::ustring()</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Add a new text node before the specified existing child node. <p> <dl compact><dt><b><a class="el" href="newin2p24s.html#_newin2p24s000002">Since libxml++ 2.24:</a></b></dt><dd></dd></dl> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>next_sibling</em> </td><td>An existing child node. </td></tr> <tr><td valign="top"></td><td valign="top"><em>content</em> </td><td>The text. This should be unescaped - see <a class="el" href="classxmlpp_1_1ContentNode.html#2e9978caa82eb11cadccd4d5fc4e690a" title="Set the text of this content node.">ContentNode::set_content()</a>. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The new text node. </dd></dl> </div> </div><p> <a class="anchor" name="21fcf0bb1ee913fb698d2ab8911dda77"></a><!-- doxytag: member="xmlpp::Element::get_attribute" ref="21fcf0bb1ee913fb698d2ab8911dda77" args="(const Glib::ustring &name, const Glib::ustring &ns_prefix=Glib::ustring()) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classxmlpp_1_1Attribute.html">Attribute</a>* xmlpp::Element::get_attribute </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>ns_prefix</em> = <code>Glib::ustring()</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const</td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="8ae47935bca05ac2a6f0d8b02221a6b1"></a><!-- doxytag: member="xmlpp::Element::get_attribute_value" ref="8ae47935bca05ac2a6f0d8b02221a6b1" args="(const Glib::ustring &name, const Glib::ustring &ns_prefix=Glib::ustring()) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Glib::ustring xmlpp::Element::get_attribute_value </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>ns_prefix</em> = <code>Glib::ustring()</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const</td> </tr> </table> </div> <div class="memdoc"> <p> Get the value of the attribute with this name, and optionally with this namespace. <p> For finer control, you might use <a class="el" href="classxmlpp_1_1Element.html#21fcf0bb1ee913fb698d2ab8911dda77">get_attribute()</a> and use the methods of the <a class="el" href="classxmlpp_1_1Attribute.html" title="Represents XML Node attributes.">Attribute</a> class. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>The name of the attribute whose value will be retrieved. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ns_prefix</em> </td><td>Namespace prefix. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The text value of the attribute, or an empty string if no such attribute was found.</dd></dl> <dl compact><dt><b><a class="el" href="newin2p20s.html#_newin2p20s000001">Since libxml++ 2.20:</a></b></dt><dd></dd></dl> </div> </div><p> <a class="anchor" name="fc9883eee2a4fb0584a60b21b5d2673b"></a><!-- doxytag: member="xmlpp::Element::get_attributes" ref="fc9883eee2a4fb0584a60b21b5d2673b" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="elRef" doxygen="libstdc++.tag.xml:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/classstd_1_1list.html">AttributeList</a> xmlpp::Element::get_attributes </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> Obtain the list of attributes for this element. <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The list of attributes. </dd></dl> </div> </div><p> <a class="anchor" name="8fbb85e7ecabc5a8b9b39638f94e4fb7"></a><!-- doxytag: member="xmlpp::Element::get_attributes" ref="8fbb85e7ecabc5a8b9b39638f94e4fb7" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" doxygen="libstdc++.tag.xml:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/classstd_1_1list.html">AttributeList</a> xmlpp::Element::get_attributes </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Obtain the list of attributes for this element. <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The list of attributes. </dd></dl> </div> </div><p> <a class="anchor" name="0a2326904a79f2e2abb5c91a4107fa6f"></a><!-- doxytag: member="xmlpp::Element::get_child_text" ref="0a2326904a79f2e2abb5c91a4107fa6f" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classxmlpp_1_1TextNode.html">TextNode</a>* xmlpp::Element::get_child_text </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> Get the first child text content node. <p> This is a convenience method, meant as an alternative to iterating over all the child nodes to find the first suitable node then and getting the text directly. <dl class="return" compact><dt><b>Returns:</b></dt><dd>The first text node, if any. </dd></dl> </div> </div><p> <a class="anchor" name="71885eacc99a1e7812b47d3d0607423a"></a><!-- doxytag: member="xmlpp::Element::get_child_text" ref="71885eacc99a1e7812b47d3d0607423a" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classxmlpp_1_1TextNode.html">TextNode</a>* xmlpp::Element::get_child_text </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Get the first child text content node. <p> This is a convenience method, meant as an alternative to iterating over all the child nodes to find the first suitable node then and getting the text directly. <dl class="return" compact><dt><b>Returns:</b></dt><dd>The first text node, if any. </dd></dl> </div> </div><p> <a class="anchor" name="f4c996b3eed332ed7e4e3096427e624d"></a><!-- doxytag: member="xmlpp::Element::get_namespace_uri_for_prefix" ref="f4c996b3eed332ed7e4e3096427e624d" args="(const Glib::ustring &ns_prefix) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Glib::ustring xmlpp::Element::get_namespace_uri_for_prefix </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>ns_prefix</em> </td> <td> ) </td> <td> const<code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="40d1299122bd9921fcb544ca1236aa95"></a><!-- doxytag: member="xmlpp::Element::has_child_text" ref="40d1299122bd9921fcb544ca1236aa95" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classbool.html">bool</a> xmlpp::Element::has_child_text </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> Discover whether one of the child nodes is a text node. <p> This is a convenience method, meant as an alternative to iterating over all the child nodes and examining them directly. <dl class="return" compact><dt><b>Returns:</b></dt><dd>Whether this node has a child text node. </dd></dl> </div> </div><p> <a class="anchor" name="3d5765f07699dc8d4d55c0b0157defad"></a><!-- doxytag: member="xmlpp::Element::remove_attribute" ref="3d5765f07699dc8d4d55c0b0157defad" args="(const Glib::ustring &name, const Glib::ustring &ns_prefix=Glib::ustring())" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void xmlpp::Element::remove_attribute </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>ns_prefix</em> = <code>Glib::ustring()</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Remove the attribute with this name, and optionally with this namespace. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>The name of the attribute to be removed </td></tr> <tr><td valign="top"></td><td valign="top"><em>ns_prefix</em> </td><td>Namespace prefix. If specified, the attribute will be removed only if the attribute has this namespace. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="359b10f76db129fff5776c8405ac8e9a"></a><!-- doxytag: member="xmlpp::Element::set_attribute" ref="359b10f76db129fff5776c8405ac8e9a" args="(const Glib::ustring &name, const Glib::ustring &value, const Glib::ustring &ns_prefix=Glib::ustring())" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classxmlpp_1_1Attribute.html">Attribute</a>* xmlpp::Element::set_attribute </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>value</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>ns_prefix</em> = <code>Glib::ustring()</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Set the value of the attribute with this name, and optionally with this namespace. <p> A matching attribute will be added if no matching attribute already exists. For finer control, you might want to use <a class="el" href="classxmlpp_1_1Element.html#21fcf0bb1ee913fb698d2ab8911dda77">get_attribute()</a> and use the methods of the <a class="el" href="classxmlpp_1_1Attribute.html" title="Represents XML Node attributes.">Attribute</a> class. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>The name of the attribute whose value will change. </td></tr> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>The new value for the attribute </td></tr> <tr><td valign="top"></td><td valign="top"><em>ns_prefix</em> </td><td>Namespace prefix. If the prefix has not been declared then this method will throw an <a class="el" href="classxmlpp_1_1exception.html" title="Base class for all xmlpp exceptions.">exception</a>. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The attribute that was changed, or 0 is no suitable <a class="el" href="classxmlpp_1_1Attribute.html" title="Represents XML Node attributes.">Attribute</a> was found. </dd></dl> </div> </div><p> <a class="anchor" name="9be4234049fe13f2941d9c7a5dbc37e2"></a><!-- doxytag: member="xmlpp::Element::set_child_text" ref="9be4234049fe13f2941d9c7a5dbc37e2" args="(const Glib::ustring &content)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void xmlpp::Element::set_child_text </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>content</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Set the text of the first text node, adding one if necessary. <p> This is a convenience method, meant as an alternative to iterating over all the child nodes to find the first suitable node then and setting the text directly. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>content</em> </td><td>The text. This should be unescaped - see <a class="el" href="classxmlpp_1_1ContentNode.html#2e9978caa82eb11cadccd4d5fc4e690a" title="Set the text of this content node.">ContentNode::set_content()</a>. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="801e28a85e4c45d145d056c5ff7186f3"></a><!-- doxytag: member="xmlpp::Element::set_namespace_declaration" ref="801e28a85e4c45d145d056c5ff7186f3" args="(const Glib::ustring &ns_uri, const Glib::ustring &ns_prefix=Glib::ustring())" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void xmlpp::Element::set_namespace_declaration </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>ns_uri</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>ns_prefix</em> = <code>Glib::ustring()</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> This adds a namespace declaration to this node which will apply to this node and all children. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>ns_uri</em> </td><td>The namespace to associate with the prefix, or to use as the default namespace if no prefix is specified. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ns_prefix</em> </td><td>The namespace prefix. If no prefix is specified then the namespace URI will be the default namespace. </td></tr> </table> </dl> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="element_8h.html">element.h</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Mon Jul 27 17:07:25 2009 for libxml++ by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> </body> </html>