XML drop down: Fail - InfoPath Dev
in

InfoPath Dev

XML drop down: Fail

Last post 03-05-2008 01:39 AM by Mojo Texas. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-04-2008 08:29 AM

    XML drop down: Fail

    Hi, I have this form in InfoPath 2003. It has drop downs for choosing languages. There are a lot of languages, so I keep the languages in an XML file and reference it in a "look up values" data connection:

    Now, that worked fine for a time, but something happened when I edited the XML, just to remove spaces that were in the Value fields. Now it does not work. If you even try to preview the form, you get an errror like this:

    The form contains XML that cannot be parsed:

    Switch from current encoding to specified encoding not supported.

    Line 1, Position 61

    <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>

    What's wrong with my XML? I am posting here an excerpt..

     <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
    <CMS_LANGUAGE_List_en xml:lang="en">
       <CMS_LANGUAGE_Entry>
          <CMS_LANGUAGE_Name>Acoli</CMS_LANGUAGE_Name>
             </CMS_LANGUAGE_Entry>
       <CMS_LANGUAGE_Entry>
          <CMS_LANGUAGE_Name>Arabic (Standard) </CMS_LANGUAGE_Name>
             </CMS_LANGUAGE_Entry>
       <CMS_LANGUAGE_Entry>
          <CMS_LANGUAGE_Name>Arabic (Sudanese) </CMS_LANGUAGE_Name>
             </CMS_LANGUAGE_Entry>
       <CMS_LANGUAGE_Entry>

  • 03-05-2008 12:38 AM In reply to

    A few more notes. I tried removing and recombining the resource files. I still get this error:

    The following DataObject either cannot be created or cannot be initialized: Language
    The query cannot be run for the following DataObject: Language
    InfoPath cannot run the specified query.
    The file is not a valid XML file.
    The form contains XML that cannot be parsed:
    Switch from current encoding to specified encoding not supported.

    Line 1, Position 61
    <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
    ------------------------------------------------------------^

  • 03-05-2008 01:39 AM In reply to

    Ha! I figured it out! This is a simple encoding error brought on my editing the thing in Notepad.

    Lessons learned:

    1)Always edit in a proper XML editing software.

    2)If you are using Notepad, be sure to Save As >> Unicode

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