Filled Infopath Form - Order of XML elements - InfoPath Dev
in

InfoPath Dev

Filled Infopath Form - Order of XML elements

Last post 01-29-2009 12:02 AM by Shiva. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-27-2009 01:03 PM

    Filled Infopath Form - Order of XML elements

    Hello,

     I am very new to Infopath forms and I have a question. I will explain what I am trying to do and the problem I am running into.

    We currently have a application which would get responses from the user. This application is been replaced by Infopath forms. But the old application responses are to be supported. So I wrote a script which would generate responses for a particular respective forms which are nothing but XML files.

    Problem is that the when I open the XML I get an error saying that "Element XXXX is not expected". After lot of time I figured out that the problem was because of order of elements in xml.

     Is there any way we can avoid this problem?

     Any help please?

  • 01-27-2009 07:55 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Filled Infopath Form - Order of XML elements

    Hello,

    We can have same order of elements available in template.xml file. If we change the any order or elements then it should not open. If you want to do in code then try to open that xml then it will give error message. You have to add the try and catch method then you have to show the message in catch block.

  • 01-28-2009 06:48 AM In reply to

    Re: Filled Infopath Form - Order of XML elements

    Hello Shiva,

     Thank you very much for the reply. let me clearly explain my situation.

    Imagine there being a Infopath form created. Now when you input data in that and save that an XML is being created. Now I am creating these xml's ( some thousands with the values in the database).

    Those created xml's refer to the main template infopath but the order of elements is being messed up. So I am trying to see if there is any way we can bypass the sitaution to see if Infopath can recognize the elemetns what ever the order they are in.

     Any Help.

     

    Thanks,

    Gopi

  • 01-29-2009 12:02 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Filled Infopath Form - Order of XML elements

    Hello,

    This is hard to find out what are the elements are missed up in your existing xml file. For this we can try one thing in code, try to open the existing xml file then it will give error message where schema structure is invalid node. Then we have to change that order but this is not a suggestible method.

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