populate form from xml file chosen by the user

D

Drew Frist

How can I enable the person filling out the form to populate the form with
data from an xml file? I need the user to enter a large matrix of numbers,
and this is easier to make in Excel. So my thinking is that the user could
create the matrix in Excel, save as XML, and then import it into the
appropriate place in the InfoPath form.

I want to allow the user to pick the xml file from a File Chooser dialog (or
something like that) from within infopath. Hard-coding the xml file name as
a Secondary Data Source or as a Resource file is not what I am looking to do.

Please advise! Thanks!
 
S

S.Y.M. Wong-A-Ton

You'll have to do something similar to what Greg did in this article
http://www.infopathdev.com/howto/tutorials/default.aspx?i=3604c87845664a19bcad1480dab420b9 but use an OpenFile dialog box instead of a SaveAs dialog box.

Once you've opened up the file and loaded the XML into InfoPath, you can use
XSLT to transform the XML to conform to the XML of a node in the Main DOM of
the InfoPath form and then just do a replace that node like I did in this
article
http://enterprise-solutions.swits.n...ata-secondary-data-source-xslt&c=infopath2003
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top