Excel, Schema and XML

D

daveroblit

When I try to open an XML file in Excel, it always tells me the source does
not refer to a schema, that Excel will create one based on the source. The
result is not pretty--it is supposed to be consistent columns and rows, but
they are all mixed up.

How do you get Excel to refer to a schema when it opens an XML file? I have
a schema, or what someone is calling a schema, for the file (appears below).

Obviously I know nothing about this and haven't been able to Google up a lot
of relevant information, except what's below.

Assuming Excel can refer to a correct schema for a given XML document, does
that mean it will display the document in the proper rows and columns?

To be specific, the XML file is "iTunesMusicLibrary.xml" and the schema
below is supposed to be for it. I want the music library data (Song Name,
Artist, Album, etc.) to appear in orderly columns and rows so I can edit it.

Thanks in advance,

Dave

=================
<schema
xmlns='http://www.w3.org/2001/XMLSchema'
targetNamespace='http://www.w3.org/namespace/'
xmlns:t='http://www.w3.org/namespace/'
xmlns:xs=''>

<element name='plist'>
<complexType>
<choice>
<element ref='t:array'/>
<element ref='t:data'/>
<element ref='t:date'/>
<element ref='t:dict'/>
<element ref='t:real'/>
<element ref='t:integer'/>
<element ref='t:string'/>
<element ref='t:true'/>
<element ref='t:false'/>
</choice>
<attribute name='version' type='string' use='required'/>
</complexType>
</element>

<element name='array'>
<complexType>
<sequence minOccurs='0' maxOccurs='unbounded'>
<choice>
<element ref='t:array'/>
<element ref='t:data'/>
<element ref='t:date'/>
<element ref='t:dict'/>
<element ref='t:real'/>
<element ref='t:integer'/>
<element ref='t:string'/>
<element ref='t:true'/>
<element ref='t:false'/>
</choice>
</sequence>
</complexType>
</element>

<element name='dict'>
<complexType>
<sequence minOccurs='0' maxOccurs='unbounded'>
<element ref='t:key'/>
<choice>
<element ref='t:array'/>
<element ref='t:data'/>
<element ref='t:date'/>
<element ref='t:dict'/>
<element ref='t:real'/>
<element ref='t:integer'/>
<element ref='t:string'/>
<element ref='t:true'/>
<element ref='t:false'/>
</choice>
</sequence>
</complexType>
</element>

<element name='key' type='string' />

<element name='string' type='string' />

<element name='data' type='base64Binary' />

<element name='date' type='dateTime' />

<element name='true' />

<element name='false' />

<element name='real' type='decimal' />

<element name='integer' type='integer' />

</schema>
 

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