msummons76
Technical User
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:
Any help would be greatly appreciated!
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=" <element name="table"/>
<complexType>
<sequence>
<element name="song"/>
</sequence>
</complexType>
<complexType name="songType">
<sequence>
<element name="artist"/>
<element name="length" type="dateTime"/>
<element name="year" type="integer"/>
<element name="album" type="string"/>
</sequence>
<attribute name="name" type="string"/>
</complexType>
</element>
</schema>
Any help would be greatly appreciated!