KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to validate my XML document against my XML schema. This is my schema: <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://cars.example.org/"> <element name="cars"> <complexType> <sequence minOccurs="0" maxOccurs="unbounded"> <element name="brand" type="string"/> </sequence> </complexType> </element> </schema> and this is my XML document: <?xml version="1.0" encoding="UTF-8"?> <cars xmlns="http://cars.example.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cars.example.org/ cars.xsd"> <brand>x</brand> </cars> Now when I'm validating the document (via Eclipse) I get following message on line 4: cvc-complex-type.2.4.a: Invalid content was found starting with element 'brand'. One of '{"":brand}' is expected. This message doesn't make any sense :(. And it's very hard (impossible?) to google solution. Thank you for your help.
Tags (comma-separated)
Save Edits
Cancel