title: XML Data Binding In Adobe Forms
body: <p>I'm pretty new to adobe forms development. I'm using LiveCycle Designer to create a PDF that is bound to an XML document. My .NET solution will generate an XML structure that is placed in an XDP form that has the PDF form template embedded in it. When the form is opened, the data binding, will bind to the form/subforms to create rows, etc. I have that portion working, but I'm not sure how to reference the current xml node while the binding is occurring so that I can grab values needed for formatting logic, performing calculations etc.  I'm using JavaScript during the initialize events.  Can anyone point me to a good resource for this or provide a sample?  </p>
  
  <p>Thanks for your help!</p>
  
  <p>Some additional detail:
  I have an xml structure like so:</p>
  
  <pre><code>&lt;DeviceTypes&gt;
    &lt;DeviceType&gt;
     &lt;Records&gt;
       &lt;Record&gt;
         &lt;RecordId&gt;1&lt;/RecordId&gt;
         &lt;Order&gt;1&lt;/Order&gt;
             &lt;Columns&gt;
               &lt;Column&gt;
                   &lt;ColumnId&gt;1&lt;/ColumnId&gt;
                   &lt;Value&gt;Test&lt;/Value&gt;
               &lt;/Column&gt;
               &lt;Column&gt;
                  &lt;ColumnId&gt;2&lt;/ColumnId&gt;
                  &lt;Value&gt;Test2&lt;/Value&gt;
               &lt;/Column&gt;
             &lt;/Columns&gt;
          &lt;/Record&gt;
      &lt;/Records&gt;
  &lt;/DeviceType&gt;
  &lt;/DeviceTypes&gt;
  </code></pre>
  
  <p>I have a subform bound to DeviceType which repeats vertically. Then a subform bound to Record which is repeats vertically. Then a subform bound to Columns repeating horizontally (creating table columns) and then within that a repeating table bound to Column with a Row containing a text box bound to Value.</p>
  
  <p>I'm performing calculations during the Row.Value::initialize event, but not sure how to access the underlying XML node and traverse up.</p>
  
  <p>For example, if I want to concat Value and ColumnId, what would be the javascript for that? Or if I wanted to concat Value with its parent Record Order?</p>
  
  <p>I've tried this on the Row Value initialize event to concat Value and ColumnId but it didn't work:</p>
  
  <pre><code>this.rawValue = this.rawValue + this.parent.dataNode.resolveNode("ColumnId").value;
  </code></pre>