XML::DOM : How to setXMLDecl ???

XML::DOM : How to setXMLDecl ???

am 17.10.2004 21:40:21 von internet

Hi,

I'm trying to set XML Decl in my XML document like this :


$doc=new XML::DOM::Document;
$decl=new XML::DOM::XMLDecl;
$decl->setVersion("1.0");
$decl->setEncoding("utf-8");
$doc->setXMLDecl($decl);

But unfortunately, it does not work !

I have tried many other possibilities
(createXMLDecl("1.0","UTF-8",undef) for instance...) but none work.

Help !?