Thanks, I believe that's what I'm looking for :)
New question that I'm pondering while messing with the new xsd...
I see that under every element in intellisense, I see the <menuBarItem> as an
element I can enter. This is not valid according to "our" standards...when I
type in <menuBarItem> under <menu> or <menuItem> it produces an error (which is a
good thing, as it's not really valid)...but the question I'm wanting to ask
is...how can I keep the menuBarItem element from appearing under all elements
except the <menuBar> element?
<menuBarItem> is just one of the elements that are available...under some others,
there are some that are not supposed to be listed as well...but are. I'm hoping
that if we can fix the <menuBarItem> element from appearing, I can see what I
need to do for the rest :)
Thanks much..
Mythran
"Zafar Abbas [MSFT]" <za****@microsoft.com> wrote in message
news:u$**************@TK2MSFTNGP10.phx.gbl...
This schema should work for you:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="menuBar">
<xs:complexType>
<xs:sequence>
<xs:element name="menuBarItem" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element ref="menu" maxOccurs="unbounded" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="menu">
<xs:complexType>
<xs:sequence>
<xs:element name="menuItem" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element ref="menu" maxOccurs="unbounded" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
"Mythran" <ki********@hotmail.com> wrote in message
news:uo****************@TK2MSFTNGP10.phx.gbl... Hrm, I don't think it's possible to create a schema for the following XML,
just asking in hopes of some good suggestions for it:
<menuBar>
<menuBarItem>
<menu>
<menuItem />
<menuItem />
<menuItem>
<menu>
<menuItem />
</menu>
</menuItem>
</menu>
</menuBarItem>
</menuBar>
Get the picture? I don't think it's possible because of the <menu>
grandchild of the first <menu> node. Anyone have any ideas of what I can do to create a
schema so I can get intellisense in the .Net ide?
Thanks in advance,
Mythran