Reputation: 53338
I'm trying to create schema file for my XML data format. I started by creating a xsd file:
A GUI tab appeared with promising menu options:
I'd like to define element and appropriate attribute names for my format. But if I click add
, all I get is this:
I also tried to write element name in the text data:
It's underlined and reports error. Nothing is added. So how should I add stuff in the schema?
Upvotes: 0
Views: 1151
Reputation: 3475
Change <Generator></Generator>
to <xs:element name="Generator"/>
or <xs:element name="Generator"></Generator>
if you have further definitions for the element. Element definitions need to be defined within the XMLSchema namespace.
I'm not much of a fan of the designer in VS. Without looking it up, you can right-click on an xsd in the Solutions Explorer and use Open With (or something like that), to get some options for opening the file. It should allow you to change the default editor for XML and XSD files.
Upvotes: 1