ho to create XML header
<p>Please how can I create an xml header like this one in Java.</p>

<pre><code>&lt;cfg:configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-
    instance" xmlns:ContentRouter="http://company/ContentRouter-3.0" 
    xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cfg="http://company/configuration"&gt;.
</code></pre>

<p>I am using <code>DocumentBuilderFactory</code> and my xml looks similar but it is a little bit different.. </p>

<p>My code: </p>

<pre><code>Element rootElement = doc.createElement("cfg:configuration");
Attr attr1 = doc.createAttribute("xmlns:xsi");
attr1.setValue("http://www.w3.org/2001/XMLSchema-instance");
Attr attr2 = doc.createAttribute("xmlns:ContentRoute");
attr2.setValue("http://eurotel/ContentRouter-3.0");
Attr attr3 = doc.createAttribute("xmlns:xs");
attr3.setValue("http://www.w3.org/2001/XMLSchema");
Attr attr4 = doc.createAttribute("xmlns:cfg");
attr4.setValue("http://eurotel/configuration");
</code></pre>

<p>Thanks for help!</p>