title: How to properly create XML header (to fill pdf documents in xfdf format) with Delphi using IXMLDOCUMENT
body: <p>please I need help to achieve this xml, I have a problme with the third line, this is what I get with my code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"&gt;
    &lt;f xmlns="" href="myExample.pdf"&gt;
      &lt;fields&gt;
        &lt;field name="chk01"&gt;
          &lt;value&gt;X&lt;/value&gt;
        &lt;/field&gt;
        &lt;field name="chk02"&gt;
          &lt;value&gt;X&lt;/value&gt;
        &lt;/field&gt;
        &lt;field name="edt11"&gt;
          &lt;value&gt;Some text&lt;/value&gt;
        &lt;/field&gt;
      &lt;/fields&gt;
    &lt;/f&gt;
  &lt;/xfdf&gt;
  </code></pre>
  
  <p><strong>and this is what I need:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"&gt;    
    &lt;f href="myExample.pdf"/&gt;
    &lt;fields&gt;
      &lt;field name="chk01"&gt;
        &lt;value&gt;X&lt;/value&gt;
      &lt;/field&gt;
      &lt;field name="chk02"&gt;
        &lt;value&gt;X&lt;/value&gt;
      &lt;/field&gt;
      &lt;field name="edt11"&gt;
        &lt;value&gt;Some text&lt;/value&gt;
      &lt;/field&gt;
    &lt;/fields&gt;
  &lt;/xfdf&gt;
  </code></pre>
  
  <p>I dont know how to create the "f" tag like in the second example, notice that it's a little bit different and it closes in the same line and not before the last line like in the first example.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>....
  Var
    XML : IXMLDOCUMENT;
    RootNode, NodeLevel1, CurNode : IXMLNODE;
  Begin
    XML := NewXMLDocument;
    XML.Encoding := 'utf-8';
    XML.Options := [doNodeAutoIndent];
  
    RootNode := XML.AddChild('xfdf');
    RootNode.Attributes['xmlns']:= 'http://ns.adobe.com/xfdf/';
    RootNode.Attributes['xml:space']:= 'preserve';
  
    RootNode := XML.DocumentElement.AddChild('f');
    RootNode.Attributes['href']:= 'myExample.pdf';
  
    NodeLevel1 := RootNode.AddChild('fields');
    CurNode := NodeLevel1.AddChild('field');
    CurNode.Attributes['name'] := 'chk01';
    CurNode := CurNode.AddChild('value');
    CurNode.Text:= 'X';
  
    CurNode := NodeLevel1.AddChild('field');
    CurNode.Attributes['name'] := 'chk02';
    CurNode := CurNode.AddChild('value');
    CurNode.Text:= 'X';
  
    CurNode := NodeLevel1.AddChild('field');
    CurNode.Attributes['name'] := 'edt11';
    CurNode := CurNode.AddChild('value');
    CurNode.Text:= 'Some text';
  
   XMl.SaveToFile('C:\New.fdf');
  </code></pre>