title: How to add a tag to the prolog of an XML via Java
body: <p>I need my XML to have the following tags, the problem is that I'm not entirely sure how to communicate the issue so google searches are not providing anything. Hopefully by seeing my question you'll understand my issue.</p>
  
  <p>The beginning of the XML document that I am creating in my Java code needs to have the following in the prolog:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
  &lt;?AdlibExpress applanguage="USA" appversion="5.0.0" dtdversion="2.6.3" ?&gt;
  &lt;!DOCTYPE JOBS SYSTEM "D:\Adlib5.4\System\DTD\AdlibExpress.dtd"&gt;
  </code></pre>
  
  <p>The encoding is easy enough. I am having difficulty adding: </p>
  
  <pre><code>&lt;?AdlibExpress applanguage="USA" appversion="5.0.0" dtdversion="2.6.3" ?&gt;  
  </code></pre>
  
  <p>I don't even know what to look for or what to call this. </p>
  
  <p>Here is the library I am using</p>
  
  <pre><code> DocumentBuilderFactory docFactory1 = DocumentBuilderFactory.newInstance();
          docFactory1.setNamespaceAware(true);
  
          DocumentBuilder docBuilder1 = docFactory1.newDocumentBuilder();
  
          // root elements
          Document doc = docBuilder1.newDocument();
  </code></pre>
  
  <p>Theres gotta be something in one of these classes to do what I'm talking about but I'm not having luck finding it. If you're able to help me, can you also let me know how to properly communicate the issue? Thanks</p>