These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

xml to dataset

jimbo
Registered: Feb 17 2008
Posts: 5

hello
I am using Acrobat 8 pro and created some forms to be filled. I will be receiving forms data in xml format by email (to save space) and i was wondering if it is possible to import the xml forms data received into a dataset without having to convert them individually to pdf forms?
Thks

My Product Information:
Acrobat Pro 8.1.2, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Is this a LiveCycle Designer Form?

Regardless, if you are not using the built in distribute/collect functionality built into Acrobat, then you will have to save the XML attachment to a local folder and then use some non-Acrobat method for importing it into your Dataset.

Alternatively, you could set up a workflow where you import the saved XML files into the same form that the user filled out, and use JavaScript to move the data from the form into your local database. If you are using an AcroForm, the ADBC object connects to ODBC. LiveCycle has it's own way of connecting to a DB. There are many variation on how this can be done.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

j_shell
Registered: Nov 16 2007
Posts: 25
Do you just need them to be together in a new dataset (e.g. a spreadsheet) or do you need to import them into an existing dataset?

If the former, the Forms>Manage form data>Merge data to spreadsheet option should work for you. I'm assuming it is an .xfdf.If the latter, you can try the earlier post suggestion. Another option is to develop an XSLT. If you are importing to Access, it allows you apply the transformation at import. I'm not as familiar with SQL Server or other SQL-based databases, but I would guess they allow similar options. Just determine what type of XML they are expecting and write the XSLT to output that format.

Here is an example of an Access XSLT. Change the table and field names to match, select import, choose options/transform and Append data to existing

rflores
Registered: Feb 28 2008
Posts: 10
Just joined this group because I have a problem in merging data from xml form into a spreadsheet. I installed acrobat 8.0 Pro. (now updated to 8.1.2), using Forms --> manage form data --> merge data into spreadsheet... to add the xml file(s) and then export to the excel spreadsheet. The XML form was created just for this purpose - to merge data into a spreadsheet.I have successfully merged a lot of the xml files a month ago by installing a friends' v.8 Pro into my machine, because she could not get the data to merge. But I could. Now I purchased my own acrobat 8 Pro. installed into my machine, and ran the same procedures, the data won't merge just like what happens to my friend. The report.csv file only shows the file names, no data. I am using the same machine, same software (I removed the previous v.8 Pro installation after the 30 days because I need to use the program so I went back to my v.6 Pro) I know the xml files are good, because I tried the same files that used to merge, but not any more. Any help from any one? Any suggestions? thanks.
j_shell
Registered: Nov 16 2007
Posts: 25
Hmm, I remember having a similar problem. I think the problem was that I was opening Acrobat Pro and then selecting Forms --> manage form data --> merge data into spreadsheet without opening an .xfdf in a form first. Everything worked fine if I first opened an .xfdf in the form I had created and then selected Forms --> manage form data --> merge data into spreadsheet. Adding the additional .xfdf files to the list at this time brought all the data into the spreadsheet.I don't understand why this worked for me, but it did.
rflores
Registered: Feb 28 2008
Posts: 10
j_shell,
Thanks for your reply. Sounds like I am getting somewhere to my problem. But I am not familiar with the .xfdf in a form. All my data files are in .xml forms (each file is from one person), can you explain a little further how to "open an .xfdf first?" thanks a lot.
rflores
Registered: Feb 28 2008
Posts: 10
j_shell wrote:
Hmm, I remember having a similar problem. I think the problem was that I was opening Acrobat Pro and then selecting Forms --> manage form data --> merge data into spreadsheet without opening an .xfdf in a form first. Everything worked fine if I first opened an .xfdf in the form I had created and then selected Forms --> manage form data --> merge data into spreadsheet. Adding the additional .xfdf files to the list at this time brought all the data into the spreadsheet.I don't understand why this worked for me, but it did.
Please explain what is an .xfdf and how to open it in a form first. thanks.
j_shell
Registered: Nov 16 2007
Posts: 25
XFDF is the XML version of FDF. Both are form data formats for PDFs. The specification is located here:
[url=http://partners.adobe.com/public/developer/en/xml/xfdf_2.0.pdf]http://partners.adobe.com/public/developer/en/xml/xfdf_2.0.pdf[/url]

However, it sounds like maybe you have exported to some other type of xml. How are the xml files created? What did you use to create the form (Acrobat or LiveCycle Designer)? What does the XML look like?

If you are not working with XFDF or FDF, I'm not sure the import to spreadsheet will work. It may, I'm just not sure. If it doesn't, one option is the transformation I mentioned above. For example, XFDF would look like this:

The XSLT I mentioned above would transform this into

This file can easily be imported to Access 2003. I've not worked with SQL, but I would guess it has similar capabilities. Excel 2003/2007 also has the ability to import XML, mapping the tags to various cells, but I don't have much experience doing so.

Give me some more info on the XML you are using and I may be able to help.
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Lori Defurio covers data collection in her video: "Initiating a Data Collection Workflow"

http://www.acrobatusers.com/tech_corners/loris_corner/loris_tips/index.php

The thing about using the Acrobat data collection tools is that the data is returned as a PDF, not an XML. Try the methodology discussed in the video.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

rflores
Registered: Feb 28 2008
Posts: 10
Hi,
My xml form is created from a PDF (as an application form). So, based on your above response, I just open the original PDF application file (which the xml form is created from) in Acrobat 8 Pro, then with that file opened on the screen, I continue with the Form menu , manage form data, merge Data Files - Add the files and merge Data Files into spreadsheet, then after the files are added, click Export. All the data merged as it should be! So in my case, I need to open the original PDF file first.

Thanks to your help, I have successfully merged all my xml data files into the spreadsheet.
rflores
Registered: Feb 28 2008
Posts: 10
I went to Lori's corner and watched the video, it is very helpful. I have saved this URL into my favorites. Thanks.
My data files come in xml form - it was created this way. But opening the PDF file first is the key. Don't know why, but it worked like a pro.