Expand my Community achievements bar.

Exporting data to XML

Avatar

Level 2

hi this is naveen...

i had newly started programming in it..

there are some controls on my designer form and i want to submit those filled data to new XML file...

                                                            please describe me in detail how could i achieve this....

3 Replies

Avatar

Level 9

Hello Naveen,

This is quite easy. Drag a button from the object library palette from the right side.Now click the Control Type as : Submit

After that click the submit section next to Field on top second row.Now specify your mail address after mailto: like mailto:somebody@somewhere.com.

Select the Submit as XML .You can select submit as PDF, XDP etc.

Thanks.

Bibhu.

Avatar

Level 2

hi ,

          thanks but i want to know by which file name my XML file get save, how can i tracking data saved in XML file.

,,,,,,,please tell me in detail about exporting data and importing in XML from beginning......

                                                                                               thanks

Avatar

Level 10

Hi Naveen,

I got your pm. You can use script to import and export XML into and out of a form. Here is a sample: https://acrobat.com/#d=DQchSy3aBzl*Id51UO4QYQ

For example to export data:

xfa.host.exportData("",0);

To import data:

xfa.host.importData("");


xfa.form.recalculate(true); // this is optional, just depends if you want to do something with the imported data

One of the big things that affects data export AND import is whether the fields have a binding (in the Object > Binding palette). If an object's binding is set to none, then it will not participate in the import or export. Check out the sample above.

Start with the export data form. Fill in some data and then click the export data. Open the import form and click the import data. You need to explore these forms and look at the object bindings (Object > Binding palette) and the script in the buttons.

One aspect to bear in mind is that users with Reader will not be able to import or export data UNLESS you Reader Enable the form using LC Reader Extensions ES2 before you send out the form. Reader enabling in Acrobat will not work. I have a summary here: http://assurehsc.ie/blog/index.php/2010/05/using-livecycle-forms-in-acrobat-and-reader/. At the end of the post, I have a summary PDF, download this and you will see the features and restrictions, depending on how you are enabling the form.

Hope this helps,

Niall