InfoPath 2003 unable to add XML file as secondary source

M

MJB

When I try to add a data connection to an XML document I get the following
message: "The selected schema contains more than one root. InfoPath can only
create a form based on one of the roots." with a dialog to select a root from
a list of file elements. But the XML file is in fact well-formed, with a
single root node and all the other requirements of well-formedness. I have
verified this using two different non-Microsoft commercial XML validators.
I'm not sure just what validation they do, but both Word 2003 and Explorer
can open the file with no warnings or errors. Not only is it well-formed, but
the file will also validate according to its XSD schema. (And I've been using
this file successfully as input to XSLT transforms and various other
processors for over a year.)

The message says "schema" but the file is actually a regular XML content
file. My guess was that InfoPath is attempting to derive its own internal
schema from the file and is failing, perhaps because the file is too large (5
Mb) or somehow too complex for it, and in failing is prompting for a root
element. Interestingly, the file's own root element does not appear in the
list InfoPath offers.

So okay I thought. Maybe if I just select the root element of the fragment I
needed in this case it would work okay. InfoPath does allow me to complete
creating the connection but, any List or Drop-down List control using that
connection for the list box values (third option) does not display the
values. This is my real problem; I'm assuming the erroneous multiple-root
message is a clue to the underlying problem.

Any ideas? Using InfoPath 2003. Thanks.
 

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