473,385 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Create valid XML

If I have an XSD, and I have to create an XmlDocument from scratch; do
I have to create the XmlDocument and then validate it using the xsd;
or is there a better way to create an XmlDocument to make sure that's
it's correct?

in other words: how do I have to create an XmlDocument if I have the
XSD?

thanks

--
Ludwig
http://www.coders-lab.be
May 15 '07 #1
5 1788

"Ludwig" <ludwig.stuyck(remove)@telenet.bewrote in message
news:tq********************************@4ax.com...
If I have an XSD, and I have to create an XmlDocument from scratch; do
I have to create the XmlDocument and then validate it using the xsd;
or is there a better way to create an XmlDocument to make sure that's
it's correct?

in other words: how do I have to create an XmlDocument if I have the
XSD?
Hi,

Why do you not using xsd.exe class generator, from the visual studio tools
for this case?

D
May 15 '07 #2
On Tue, 15 May 2007 16:10:27 +0200, "Dubravko Sever"
<Du******************@foi.hrwrote:
>
"Ludwig" <ludwig.stuyck(remove)@telenet.bewrote in message
news:tq********************************@4ax.com.. .
>If I have an XSD, and I have to create an XmlDocument from scratch; do
I have to create the XmlDocument and then validate it using the xsd;
or is there a better way to create an XmlDocument to make sure that's
it's correct?

in other words: how do I have to create an XmlDocument if I have the
XSD?
Hi,

Why do you not using xsd.exe class generator, from the visual studio tools
for this case?

D
Oh :) Thanks :) So I can use xsd.exe to generate source code that
corresponds to the schema, didn't know that.

Thanks again, you probably saved me a lot of time!

--
Ludwig
http://www.coders-lab.be
May 15 '07 #3

Yeah, if you have an existing xml document.

You use that command line tool. and it will reverse engineer it.

Be careful, because DataSet xml is usually Element based.

<MyDataSet>
<Author>
<ID>123</ID>
<LastName>Smith</LastName>
<FirstName>John</FirstName>
</Author>

<Author>
<ID>234</ID>
<LastName>Jones</LastName>
<FirstName>Mary</FirstName>
</Author>

</MyDataSet>

(and not)

<MyDataSet>
<Author ID='123' LastName='Smith' FirstName='John'/>
</MyDataSet>
which is very attribute based.

DataSet's also like tables that relate and NOT nested values.
Sometimes you may want to transform your original xml into a more friendly
type DataSet xml.
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!148.entry

...

"Ludwig" <ludwig.stuyck(remove)@telenet.bewrote in message
news:34********************************@4ax.com...
On Tue, 15 May 2007 16:10:27 +0200, "Dubravko Sever"
<Du******************@foi.hrwrote:

"Ludwig" <ludwig.stuyck(remove)@telenet.bewrote in message
news:tq********************************@4ax.com...
If I have an XSD, and I have to create an XmlDocument from scratch; do
I have to create the XmlDocument and then validate it using the xsd;
or is there a better way to create an XmlDocument to make sure that's
it's correct?

in other words: how do I have to create an XmlDocument if I have the
XSD?
Hi,

Why do you not using xsd.exe class generator, from the visual studio
tools
for this case?

D

Oh :) Thanks :) So I can use xsd.exe to generate source code that
corresponds to the schema, didn't know that.

Thanks again, you probably saved me a lot of time!

--
Ludwig
http://www.coders-lab.be

May 16 '07 #4
On Wed, 16 May 2007 15:13:11 -0400, "sloan" <sl***@ipass.netwrote:
>
Yeah, if you have an existing xml document.

You use that command line tool. and it will reverse engineer it.

Be careful, because DataSet xml is usually Element based.

<MyDataSet>
<Author>
<ID>123</ID>
<LastName>Smith</LastName>
<FirstName>John</FirstName>
</Author>

<Author>
<ID>234</ID>
<LastName>Jones</LastName>
<FirstName>Mary</FirstName>
</Author>

</MyDataSet>

(and not)

<MyDataSet>
<Author ID='123' LastName='Smith' FirstName='John'/>
</MyDataSet>
which is very attribute based.

DataSet's also like tables that relate and NOT nested values.
Sometimes you may want to transform your original xml into a more friendly
type DataSet xml.
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!148.entry

..
What do you mean? I have an XSD, and I use XSD.EXE to generate the
classes. I then use these classes to create the data and serialize it
into xml. I don't have a dataset?

--
Ludwig
http://www.coders-lab.be
May 16 '07 #5

Ok...

Ignore what I said.
Some people use the xsd.exe to reverse engineer a dataset.
Sorry for the confusion.


"Ludwig" <ludwig.stuyck(remove)@telenet.bewrote in message
news:n5********************************@4ax.com...
On Wed, 16 May 2007 15:13:11 -0400, "sloan" <sl***@ipass.netwrote:

Yeah, if you have an existing xml document.

You use that command line tool. and it will reverse engineer it.

Be careful, because DataSet xml is usually Element based.

<MyDataSet>
<Author>
<ID>123</ID>
<LastName>Smith</LastName>
<FirstName>John</FirstName>
</Author>

<Author>
<ID>234</ID>
<LastName>Jones</LastName>
<FirstName>Mary</FirstName>
</Author>

</MyDataSet>

(and not)

<MyDataSet>
<Author ID='123' LastName='Smith' FirstName='John'/>
</MyDataSet>
which is very attribute based.

DataSet's also like tables that relate and NOT nested values.
Sometimes you may want to transform your original xml into a more
friendly
type DataSet xml.
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!148.entry

..

What do you mean? I have an XSD, and I use XSD.EXE to generate the
classes. I then use these classes to create the data and serialize it
into xml. I don't have a dataset?

--
Ludwig
http://www.coders-lab.be

May 16 '07 #6

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

Similar topics

5
by: lkrubner | last post by:
I have a webserver through Rackspace. I create a domain. I create an FTP user. I upload some files. I create a database called testOfSetupScript and then I create a database user named setup. I...
9
by: jab | last post by:
Je veux lier (join) une table qui se trouve dans une database avec une qui se trouve dans une autre database. Les 2 databases sont sur le même serveur en l'occurence DB2/NT 7.2.9. J'ai créé un...
2
by: Jim | last post by:
All of a sudden I am unable to create tables or add columns to existing tables if I specify CHARACTER greater than 254. If I try I get the following error: DB21034E The command was processed as...
23
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these...
1
by: simun.selak | last post by:
On my local installation of DB2 on AS/400 (BTW., how do I find out which version od DB2 I have?) I have created these SQL statements: CREATE SEQUENCE a.seq AS INTEGER START WITH 8955 INCREMENT...
3
by: meettapan | last post by:
I want to create the log file as below:- 2007/03/09 19:12:08 : ~extasc_cdr_20061230.csv.vcdr 2007/03/09 19:23:02 : ~extasc_cdr_20061230.csv.vcdr 2007/03/09 19:42:13 :...
3
by: Rahul B | last post by:
Hi, I have a user UCLDEV1 which is a part of staff and a group(db2schemagrp1) to which i have not given any permissions. The authorizations of that user are shown as db2 =get authorizations...
5
by: vjsv2007 | last post by:
Can you help to make one alert with all details? <script type="text/javascript"> <!-- function validate_form ( ) { valid = true;
6
by: Alvin SIU | last post by:
Hi all, I have a table in Db2 v8 like this: Team Name Role ------ -------- --------------------- A Superman Leader A Batman Member A WonderWoman Member B ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.