How do I add child elements to XML using Perl's XML::Twig?
- by Ninja
I have the following XML file:
<SOURCE_SERVER>
<SERVER HOSTNAME="serv1">
<CIFS_SERVICE NETBIOSNAME="serv1"/>
</SERVER>
<SERVER HOSTNAME="serv2">
</SERVER>
<SOURCE_SERVER>
Now, I want to add child <CIFS_SERVICE NETBIOSNAME="serv2"/> to <SERVER HOSTNAME="serv2">. How do I do this using XML::Twig?