</p><divclass="calloutlist"><tableborder="0"summary="Callout list"><tr><tdwidth="5%"valign="top"align="left"><ahref="#addreferencenode"><imgsrc="images/callouts/1.png"alt="1"border="0"></a></td><tdvalign="top"align="left"><p>First we add a new node at the location of the current node
pointer, <ttclass="varname">cur.</tt> using the <ahref="https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#XMLNEWTEXTCHILD"target="_top">xmlNewTextChild</a> function.</p></td></tr></table></div><p>
</p><p>Once the node is added, the file is written to disk just as in the
previous example in which we added an element with text content.</p></div><divclass="navfooter"><hr><tablewidth="100%"summary="Navigation footer"><tr><tdwidth="40%"align="left"><aaccesskey="p"href="ar01s06.html">Prev</a><EFBFBD></td><tdwidth="20%"align="center"><aaccesskey="u"href="index.html">Up</a></td><tdwidth="40%"align="right"><EFBFBD><aaccesskey="n"href="ar01s08.html">Next</a></td></tr><tr><tdwidth="40%"align="left"valign="top">Writing element content<6E></td><tdwidth="20%"align="center"><aaccesskey="h"href="index.html">Home</a></td><tdwidth="40%"align="right"valign="top"><EFBFBD>Retrieving Attributes</td></tr></table></div></body></html>