![]() |
|
|
|||||||
![]() |
XML - Re: Newb Q: How define element in XML Schema which forces it to be empty? |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Try this:
<?xml version="1.0"> <xs:schema xmlns elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="myEmptyElement"> <xs:complexType></xs:complexType> </xs:element> </xs:schema> "Rich Weed" <> skrev i meddelandet news:Xns93A3DA691C76BweedrichardNOhotmSPA@24.24.2. 166... > I currently set the type to xs:string and length to 0. Is this the proper > way to define an element so that it must be empty if it's present? > > -- > > Remove NO SPAM to reply gabriel |
|
|
|
|
#2 |
|
Posts: n/a
|
ok, thanks!
"gabriel" <> wrote in news:HadKa.38$: > Try this: > > <?xml version="1.0"> > <xs:schema xmlns > elementFormDefault="qualified" attributeFormDefault="unqualified"> > > <xs:element name="myEmptyElement"> > <xs:complexType></xs:complexType> > </xs:element> > </xs:schema> > > > > "Rich Weed" <> skrev i meddelandet > news:Xns93A3DA691C76BweedrichardNOhotmSPA@24.24.2. 166... >> I currently set the type to xs:string and length to 0. Is this the >> proper way to define an element so that it must be empty if it's >> present? >> |
|