473,803 Members | 3,518 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML Schema, how to create one for this xml file?

<Directory xmlns="http://tempuri.org/test.xsd" name="root">
<file name="File1"></file>
<file name="File2"></file>
<Directory name="Dir1">
<file name="File1"></file>
<file name="File2"></file>
<Directory name="Dir1">
<file name="File1"></file>
<file name="File2"></file>
</Directory>
</Directory>
</Directory>

I have the above xml file and want to create an xml schema file for it. Each
directory could many subdirectories and these could also have many
subdirectories infinitely deep. Visual studio seems have a problem creating a
schema for this? Is it possible?
Nov 12 '05 #1
1 2099
<xs:schema attributeFormDe fault="unqualif ied" elementFormDefa ult="qualified"
targetNamespace ="http://tempuri.org/test.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://tempuri.org/test.xsd">
<xs:element name="Directory ">
<xs:complexType >
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbo unded" name="file">
<xs:complexType >
<xs:attribute name="name" type="xs:string " use="optional" />
</xs:complexType>
</xs:element>
<xs:element ref="Directory" minOccurs="0" maxOccurs="unbo unded"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string " use="optional" />
</xs:complexType>
</xs:element>
</xs:schema>

"android" <an*****@discus sions.microsoft .com> wrote in message
news:77******** *************** ***********@mic rosoft.com...
<Directory xmlns="http://tempuri.org/test.xsd" name="root">
<file name="File1"></file>
<file name="File2"></file>
<Directory name="Dir1">
<file name="File1"></file>
<file name="File2"></file>
<Directory name="Dir1">
<file name="File1"></file>
<file name="File2"></file>
</Directory>
</Directory>
</Directory>

I have the above xml file and want to create an xml schema file for it. Each directory could many subdirectories and these could also have many
subdirectories infinitely deep. Visual studio seems have a problem creating a schema for this? Is it possible?

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1306
by: Lee Harr | last post by:
I am used to creating sequences separately and using them for default values instead of using the serial type. I am not sure why... but that's the way I have been doing it. Maybe I don't trust the generated names. I should probably just get over it, but anyhow... Let's say I am writing a file for creating a database. Say ... -- schematest CREATE SEQUENCE foo_id_seq; CREATE TABLE foo(
2
9834
by: Steven (dotnet newbie) | last post by:
Hello. I am trying to create a database from an XML file. I am able to create a dataset from the XML doc, but how can I create a database schema from the dataset and populate the database? Or is this even possible using VS.NET 2003? Part of the XML file follows. Thanks for any help. Steven VS.NET 2003 and C# newbie! ----- Part of the XML (one full record across several tables) --------
1
4338
by: Christian | last post by:
Hi, I load an Xml-file "customers.xml" into a DataSet (works fine) but then how do I validate it against a schema (e.g. customers.xsd) ? my customers.xml: <?xml version="1.0" encoding="utf-8"?>| <customers xmlns="http://tempuri.org/customers.xsd"> <Customer ID="1000"> <FirstName>Greg</FirstName>
6
2595
by: Martin | last post by:
Hi, I have a xml file like the one below <?xml version="1.0" encoding="utf-8"?><e1 xmlns:e1="http://tempuri.org/Source1.xsd" e1:att1="1" e1:att2="2" e1:rest="345"/> If I try to create a schema for it with Visual Studio, I get the error "Failed to create a schema for this data file because:
0
1085
by: Sean | last post by:
Hello, I have the following scenario. I hope someone may help me on this: I have an ASP.NET web-application that create .xml files according to a defined schema and they are sent out to our customers to review and/or to update the information. I need to create a new VB.NET application (in the customer side) :
3
8094
by: Kiran | last post by:
Hi, I want to back up my data in some table in SQL server and import it back using Bulk Load of SQL server 2K. I can use the following code to backup the data in XML dataset.WriteXml(@"C:\Data.xml"); dataset.WriteXmlSchema(@"C:\Schema1.xml");
4
1884
by: Sindarian | last post by:
This just seems like the most basic thing, but I can't find a simple description of this process anywhere and in here, everone is talking about going the other way :( I had .NET create an XML Schema file (xsd) for a table in my database. I then create a DataSet that contains 1 row of data from that same table. I want to use this DataSet along with the Schema file to create an XML file that ACTUALLY CONTAINS THE DATA. Simple huh: DataSet +...
2
2783
by: Lee Harr | last post by:
I must have a fundamental misunderstanding about using schema. Before using schema, I usually have a file that has my database definition, and I can play that file back in to a new database to create a testing area or to create my production setup. I think I want to use schema the same way. My problem is using a sequence for a default value. I know that if I use a serial instead, all of this will go away, but my design
5
4955
by: paul_zaoldyeck | last post by:
does anyone know how to validate an xml file against multiple defined schema? can you show me some examples? i'm making here an xml reader.. thank you
1
1094
by: =?Utf-8?B?VGVycmFuY2U=?= | last post by:
Good Morning. I'm trying to create a xml file and schema file for my boss to upload the information into Sharepoint. Everytime when he uploads the xml file it notices there's no schema and I'm automatically generating the file; so I decided to programmatically create a schema file. It's a simple file and it's works accept for the last elements . Instead of writing </xsd:elementand </xsd:schemait places the namespace in the schema tag and...
0
9699
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
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10309
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
10289
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,...
0
10068
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9119
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7600
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...
2
3795
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2968
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.