Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Why am I getting an attribute error?

Why am I getting an attribute error?

Why am I getting an attribute error?

Hello All,

I'm fairly new to XML and trying to create a schema to set up the format of a table. The reference to the schema seems to work (which was a challenge in itself), but the schema itself gets errors when trying to open the XML file (using MS EXCEL). I have been able to resolve the errors as I see them but am getting an error in regards to the attributes. For some reason they are not being picked up in the XSD code and can not figure it out. I believe it may be a case of certain lines not being where they should but coming to you all as a second pair of eyes to see if my coding is correct. Schema code is below:


<?xml version="1.0" encoding="utf-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
  <element name="table"/>
      <element name="song"/>
   <complexType name="songType">
      <element name="artist"/>
      <element name="length" type="dateTime"/>
      <element name="year" type="integer"/>
      <element name="album" type="string"/>
    <attribute name="name" type="string"/>    

Any help would be greatly appreciated!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close