473,657 Members | 2,572 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to do with xml file -> schema file (fuction i .NET)

I use a BulkLoad to import file.xml to my base MS Server 2000.
To import this xml file I need schema file. Mayby you know how to do this
file mechanicy f.g. mayby somebody have some script in .net who generate
this schema.
for any help Thanks

======== My xml file =============== =============== ===
<ROOT>
<Customers>
<CustomerId>555 5</CustomerId>
<CompanyName>Ja goda1</CompanyName>
<City>NY</City>
</Customers>
<Customers>
<CustomerId>020 0</CustomerId>
<CompanyName>To m Johnston</CompanyName>
<City>LA</City>
</Customers>
<Customers>
<CustomerId>199 </CustomerId>
<CompanyName>In stitute of Art</CompanyName>
</Customers>
</ROOT>
=============== =============== =============== ====

My schema . How to do this schema mechanicy? Becouse in this time I must do
this schema ofcourse writing.

=============== =============== MY Schema file ===============
<?xml version="1.0" ?>
<Schema xmlns="urn:sche mas-microsoft-com:xml-data"
xmlns:dt="urn:s chemas-microsoft-com:xml:datatyp es"
xmlns:sql="urn: schemas-microsoft-com:xml-sql" >

<ElementType name="CustomerI d" dt:type="int" />
<ElementType name="CompanyNa me" dt:type="string " />
<ElementType name="City" dt:type="string " />

<ElementType name="ROOT" sql:is-constant="1">
<element type="Customers " />
</ElementType>

<ElementType name="Customers " sql:relation="C ustomer">
<element type="CustomerI d" sql:field="Cust omerId" />
<element type="CompanyNa me" sql:field="Comp anyName" />
<element type="City" sql:field="City " />
</ElementType>

</Schema>

=============== =============== =============== ===========
Do you have any idea ???
Sorry for my english :)

--
Luk
lj**@wp.pl


Nov 12 '05 #1
1 1716
Luk,

Take a look at the Schema Inference Tool on GotDotNet [0]. You can run
the tool there and download the code as well. It was developed by
members of the same team that is working on the System.Xml libraries in
the .NET framework.

HTH,
Christoph Schittko
MVP XML
http://weblogs.asp.net/cschittko

[0] http://apps.gotdotnet.com/xmltools/xsdinference/
-----Original Message-----
From: Szaki [mailto:lj**@gaz eta.pl]
Posted At: Friday, November 05, 2004 4:08 AM
Posted To: microsoft.publi c.dotnet.xml
Conversation: How to do with xml file -> schema file (fuction i .NET)
Subject: How to do with xml file -> schema file (fuction i .NET)

I use a BulkLoad to import file.xml to my base MS Server 2000.
To import this xml file I need schema file. Mayby you know how to do this file mechanicy f.g. mayby somebody have some script in .net who generate this schema.
for any help Thanks

======== My xml file =============== =============== ===
<ROOT>
<Customers>
<CustomerId>555 5</CustomerId>
<CompanyName>Ja goda1</CompanyName>
<City>NY</City>
</Customers>
<Customers>
<CustomerId>020 0</CustomerId>
<CompanyName>To m Johnston</CompanyName>
<City>LA</City>
</Customers>
<Customers>
<CustomerId>199 </CustomerId>
<CompanyName>In stitute of Art</CompanyName>
</Customers>
</ROOT>
=============== =============== =============== ====

My schema . How to do this schema mechanicy? Becouse in this time I must do
this schema ofcourse writing.

=============== =============== MY Schema file ===============
<?xml version="1.0" ?>
<Schema xmlns="urn:sche mas-microsoft-com:xml-data"
xmlns:dt="urn:s chemas-microsoft-com:xml:datatyp es"
xmlns:sql="urn: schemas-microsoft-com:xml-sql" >

<ElementType name="CustomerI d" dt:type="int" />
<ElementType name="CompanyNa me" dt:type="string " />
<ElementType name="City" dt:type="string " />

<ElementType name="ROOT" sql:is-constant="1">
<element type="Customers " />
</ElementType>

<ElementType name="Customers " sql:relation="C ustomer">
<element type="CustomerI d" sql:field="Cust omerId" />
<element type="CompanyNa me" sql:field="Comp anyName" />
<element type="City" sql:field="City " />
</ElementType>

</Schema>

=============== =============== =============== ===========
Do you have any idea ???
Sorry for my english :)

--
Luk
lj**@wp.pl

Nov 12 '05 #2

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

Similar topics

2
3365
by: Wayne Shook | last post by:
I'm using the .NET IDE and I have an XML file that I'm trying to validate against an XML schema on my local drive. the noNamespaceSchemaLocation attribute has been modified to what I think is the proper syntax for the path on my local Windows drive (changed the directory delimeters from "\" to "/" also??). I have no web service on my machine. The XML file:
9
12469
by: Leona | last post by:
Hello all, does anyone know of a tool, preferably free, preferably on linux, which will take an xml file and validate it against your own custom W3C XML Schema file (.xsd) ?? All help appreciated - it's proving very difficult to find. Failing that, does anyone know how to get the W3C's own online validating engine (XSV, I think it's called) to do the same job? I can't get it to do what I want and I can't really understand the output.
1
1650
by: Scott Brady Drummonds | last post by:
Hi, everyone, I'm designing my first XML-based application and am stuck on an issue that I presume is pretty simple. I'm trying to write a schema that can be used to validate my XML file. However, I want to define components of this schema in different files so that I can do isolated tests on these subsections. As an example, consider this XML file: <container> <name>Me</name>
2
10750
by: Vagabond Software | last post by:
I have translated a DTD to an XML Schema (XSD) file by hand, and the Schema View in Visual Studio .NET 2003 seems to diplay everything properly. However, when I specify the schemalocation in my xml files, VS.NET still reports that no schema could be located. Here are the relevant (maybe) portions of the files: FROM THE SCHEMA FILE (mydoc-v2.xsd) <?xml version="1.0" encoding="utf-8" ?> <xs:schema...
0
1011
by: Lindy | last post by:
I have a schema file called asc.xsd which I have added to my project .Net project (VB). I am using XMLTextWriter in order to create/write data to a new XML file. Is there a way to access the elements, etc. from this schema in order to simplify my writing of the elements to the new XML file? If so, how would I do this? When I look at the file in the Schema layout, the top node is called "HC_DATA". There are 3 elements in that box:...
3
8088
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
1874
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 +...
1
6136
by: donnie.hale | last post by:
Question: What's the "canonical" way to import an existing XSD schema file into VS2005 in such a way that I can use standard C# object / property techniques to create content of that schema type and ultimately generate an XML file based on that schema? Background: I've been given an XSD file by a 3rd party. I need to generate XML files based on that schema. Note that is ***not*** for web service
5
4107
by: pronerd | last post by:
I am trying to run an XSLT on a schema (XSD) file. The schema file has a "xsd:include" tag that includes another XSD file. When I load the schema in XML editors like XML Spy the data from all of the files is loaded. When I run the XSL translation only the XSD data from the first file is loaded and translated. The data from the file referenced in the included tag is skipped. Anyone have any ideas why? Example XSD file <?xml...
0
8326
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
8743
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
8522
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
8622
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
7355
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
6177
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
5647
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
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1736
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.