Avatar

Level 1

Dear everyone,

I am trying to bind some XML data to an existing node upon initialisation of the data node. I try the following:

var xml = ""
xml = xml + "<PEOPLE>"
xml = xml + "<DATA>"
xml = xml + "<NAME>Tim</NAME>"
xml = xml + "<JOB>Lumberjack</JOB>"
xml = xml + "</DATA>"
xml = xml + "<DATA>"
xml = xml + "<NAME>Jack</NAME>"
xml = xml + "<JOB>Programmer</JOB>"
xml = xml + "</DATA>"
xml = xml + "</PEOPLE>"
xfa.data.PEOPLE.loadXML(xml, true, true)

Since it does not seem to work, I display my data with the following comment on a text field:

xfa.datasets.saveXML("pretty")

This results in:

<?xml version="1.0" encoding="UTF-8"?>

<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
   <xfa:data>
      <data>
         <PEOPLE/>
      </data>
   </xfa:data>
   <dd:dataDescription xmlns:dd="http://ns.adobe.com/data-description/" dd:name="data">
      <data>
         <CRITERIA dd:dataNode="dataGroup"/>
      </data>
   </dd:dataDescription>
</xfa:datasets>

I would like to use this data later to bind a subform to the repeating data nodes and creating a dynamic list...


In short: my data does not get bound to begin with. I expect the issue to be with how I access the root node, there is nothing else I can think of.

Any input would be greatly appreciated!

Thanks a lot,

Tim