473,811 Members | 2,869 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

can we generate a class using xsd.exe when there is a <simpleType> ?

2 New Member
can we generate a class for the following xsd file using xsd.exe?? it does'nt contain a complex type..


<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema targetNamespace ="http://www.sonatacentr al.com/service/v20" xmlns:sc="http://www.sonatacentr al.com/service/v20" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefa ult="qualified" attributeFormDe fault="unqualif ied">
<xs:simpleTyp e name="ExpenseGr oup">
<xs:annotatio n>
<xs:documentati on>tscm_expense _group.expg_sho rt_description</xs:documentatio n>
</xs:annotation>
<xs:restricti on base="xs:string ">
<xs:maxLength value="15" />
</xs:restriction>
</xs:simpleType>
</xs:schema>

when i try to generate a class file for this xsd using xsd.exe, it throws me the following error:

Warning: cannot generate classes because no top-level elements with complex type were found.

Please help.

Thanks,
Shruthi
Jul 1 '08 #1
1 7953
jkmyoung
2,057 Recognized Expert Top Contributor
No, a proper schema needs at least one element; otherwise you're not referring to an xml document. Is there a particular reason you're trying to do this?
Jul 2 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1806
by: Markus Seibold | last post by:
Hello NG, sorry for pasting that much code but I just can't figure out how get the <key><keyref> to work in XML Schema. I am using XMLSpy 4.3 for editing my XML. I want to represent a recursive 1:n relationship between a database table AdminUnit (i.e., States consist of Counties).
3
4564
by: Kimmo J?rvikangas | last post by:
Dear XML (Schema) experts, As an example I have the following schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="ROOT_ELEMENT"> <xs:complexType> <xs:choice>
2
6707
by: Ian Griffiths | last post by:
I have been given a schema, instances of which I'm required to be able to consume and generate. I'd like to be able to manipulate these instances as DataSets internally in my application. The schema defines the following simpleType: <xs:simpleType name="cs"> <xs:restriction base="xs:token"> <xs:pattern value="*"/> </xs:restriction> </xs:simpleType>
0
3030
by: keith bannister via .NET 247 | last post by:
(Type your message here) -------------------------------- From: keith bannister Hi, I'm new to .net (as of last week) but here goes. I want to serialize/deserialize a file the conforms to an XML schema (xsd).
5
7289
by: Keith Bannister | last post by:
I'm new to .net so here goes. I'm tying to deserialize a class that is associated with an XML schema. I created the C# class with xsd.exe as below: xsd.exe /c /n:somenamespace properties.xsd this creates properties.cs
2
2302
by: SA | last post by:
Hi all, in the following situation: <xs:element name="Type"> <xs:simpleType> <xs:restriction base="xs:NMTOKEN">
1
1724
by: MSolve1 | last post by:
Hi, People I'd like to restrict the contents of an element to a list of string values delimited by a space such as the one below: <tables>summary positions trades</tables> So I defined the following schema: ....
0
1452
by: shruthid | last post by:
can we generate a class for the following xsd file?? it does'nt contain a complex type.. <?xml version="1.0" encoding="UTF-8" ?> <xs:schema targetNamespace="http://www.sonatacentral.com/service/v20" xmlns:sc="http://www.sonatacentral.com/service/v20" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:simpleType name="ExpenseGroup"> <xs:annotation>...
1
3013
by: nickweavers | last post by:
Hi, I have a wsdl I have to conform to that looks like this: <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.paaleads.com/LeadConsumerService/" xmlns:s="http://www.w3.org/2001/XMLSchema"
0
9722
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10393
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4334
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.