in reply to Question about XML::DOM::Lite

createTextNode is a DOCUMENT method, so the object used should be $dc, not $elem2.

It returns a NODE object that you can use to attach as a child node.

            "XML is like violence: if it doesn't solve your problem, use more."