create a document xml

Hi all,

I want to create a document XML in order to create a xml message.

I will use the libxml xmlNewDoc method, after i want to create a node and to set it as root element.

My problem is that the xmlNewDoc has an imput parameter which take the version of xml,and after creating and adding nodes the xml message will look like that

<?xml version="1.0"?>
<EXAMPLE prop1="gnome is great" prop2="& linux too">
<head>
<title>Welcome to Gnome</title>
</head>
<chapter>
<title>The Linux adventure</title>
<p>bla bla bla ...</p>
<image href="linus.gif"/>
<p>...</p>
</chapter>
</EXAMPLE>

but what i have to di is that my xml message begin with the root element like :

<EXAMPLE prop1="gnome is great" prop2="& linux too">
<head>
<title>Welcome to Gnome</title>
</head>
<chapter>
<title>The Linux adventure</title>
<p>bla bla bla ...</p>
<image href="linus.gif"/>
<p>...</p>
</chapter>
</EXAMPLE>

which mean without the line below :
<?xml version="1.0"?>

Could you please help me ?

Thanks in advance
[1408 byte] By [Patator] at [2007-11-20 11:45:04]