I've been trying to solve this issue, but I can't understand where it comes from:
Invalid content was found starting with element 'sport'. One of '{spalanie}' is expected.
Here's part of the XML:
<?xml version="1.0" encoding="utf-8"?> <spinning> <tabela> <porownanie waga="45"> <sport>Bieg 11km/h</sport> <spalanie>610</spalanie> <sport>Skakana</sport> <spalanie>500</spalanie> <sport>Pływanie 50m/min</sport> <spalanie>325</spalanie> <sport>Spinning</sport> <spalanie>800</spalanie> </porownanie> </tabela> Here's the following XSD:
<xsd:schema version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="spinning" type="spinning_typ"/> <xsd:complexType name="spinning_typ"> <xsd:sequence> <xsd:element name="tabela" type="tabela_typ" maxOccurs="unbounded"/> <xsd:element name="zapisy" type="zapisy_typ"/> <xsd:element name="sprzet" type="sprzet_typ"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="tabela_typ"> <xsd:sequence> <xsd:element name="porownanie" maxOccurs="unbounded"> <xsd:complexType> <xsd:sequence> <xsd:element maxOccurs="unbounded" name="sport"/> <xsd:element maxOccurs="unbounded" name="spalanie" type="xsd:decimal"/> </xsd:sequence> <xsd:attribute ref="waga"/> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType>
No comments:
Post a Comment