Read InfoPath'07 XML using MSXML2 & VBA - InfoPath Dev
in

InfoPath Dev

Read InfoPath'07 XML using MSXML2 & VBA

Last post 09-10-2009 08:53 AM by dpenny. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-08-2009 12:16 PM

    • dpenny
    • Not Ranked
    • Joined on 03-20-2009
    • Silicon Valley
    • Posts 5

    Read InfoPath'07 XML using MSXML2 & VBA

    How do I read and parse (select single node....) the Infopath'07 XML (data only) files using MSXML2 and VBA? I seem to be able to navigate and load the XML from SharePoint form lib but get a load error "only one top level element is allowed in an XML document."

    Is it a valid XML file? The elements with no data are like: <my:WrittenBy1 /> Is there a different problem?

    dpenny
    Filed under: , ,
  • 09-10-2009 04:38 AM In reply to

    Re: Read InfoPath'07 XML using MSXML2 & VBA

    Hi Just run into the same problem;I haven't solved it, but made some headway. First, it seems inconsistent between users (code works ok on my machine, but not others) - I've tried different versions of the Microsoft XML dll via VBA references, to no avail Interestingly, I can stop the error by opening the xml file in notepad and removing the line in standard infopath header as shown below (though this is by no means a fix - infopath just replaces the deleted line whenever the form is re-edited) .....
  • 09-10-2009 08:39 AM In reply to

    Re: Read InfoPath'07 XML using MSXML2 & VBA

    It might be helpful if you post your code...

    Hilary Stoupa

  • 09-10-2009 08:53 AM In reply to

    • dpenny
    • Not Ranked
    • Joined on 03-20-2009
    • Silicon Valley
    • Posts 5

    Re: Read InfoPath'07 XML using MSXML2 & VBA

    I got around my problem by letting MS Word navigate to & open directly the Infopath07 form. Then in VBA pick up the XPATHs to the data wanted by using the PRIVATE fields to specify the XPATHs. Then get the text data from the open Infopath form and plunk it into the Word template. The hardest part was handling repeating table rows from Infopath form.

    dpenny
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.