473,322 Members | 1,405 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,322 software developers and data experts.

XML Instance from XML Schema

EAI
How do I create an instance of XML from XML Schema (xsd to be specific) and
instantiate its elements in C#?
Nov 12 '05 #1
3 1263
EAI wrote:
How do I create an instance of XML from XML Schema (xsd to be specific) and
instantiate its elements in C#?


You can't.
What you can do is getting Schema-information from the SchemaObjectModel
and build some XML for this. But as there is not "the one" XML-file that
matches the schema, there is no easy way (consider XHTML).

--
Pascal Schmitt
Nov 12 '05 #2
EAI
Can I create a cs file from schema using XSD tool and then create new
instance and instantiate it and convert it into xml? I am looking for even
better way to do that.

Thanks
"Pascal Schmitt" <ne*******@cebra.nu> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
EAI wrote:
How do I create an instance of XML from XML Schema (xsd to be specific)
and instantiate its elements in C#?


You can't.
What you can do is getting Schema-information from the SchemaObjectModel
and build some XML for this. But as there is not "the one" XML-file that
matches the schema, there is no easy way (consider XHTML).

--
Pascal Schmitt

Nov 12 '05 #3
Hello!
Can I create a cs file from schema using XSD tool and then create new
instance and instantiate it and convert it into xml? I am looking for even
better way to do that.


How do you want to fill it with data?
The XSD Tool also does not cover all of XSD.

What do you want to do? Why do you need to create an XML document from
an (unknown?) Schema?
--
Pascal Schmitt
Nov 12 '05 #4

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

Similar topics

2
by: Jamie Chen | last post by:
Hello, need some help to understand this.(I am using DevSutio.Net) I set the default name space to be "http://www.w3.org/2001/XMLSchema" in my XML schema and I use my XML schema as the default...
1
by: wooks | last post by:
The schema below describes an interface to a form where the appInterface type is an extension of an abstract type called interface and it contains an appFrame element that is an extension of an...
0
by: bsdbsd | last post by:
I need to create valid XML data. This data will need to be able to be validated against an XSD schema. The tool I am trying to use is Xerces C++. Being new to both C++ and XML, I am a little...
2
by: Porthos | last post by:
I'm fairly certian that I can't do what I'm about to ask, but here goes. I have a schema document in which a dozen different simpleTypes have been declared. Each simple type restricts xsd:integer...
2
by: James | last post by:
I have an instance document like this: <group xsi:schemaLocation="http://www.foo.org/2003 http://www.foo.org/2003/foo.xsd" xmlns:xxx="http://www.foo.org/2003"> <xxx:myItem>123456</xxx:myItem>...
4
by: John | last post by:
I am trying to use the xml desinger in .net 1.1 to create the follow schema. where USAddress is derived from Address But when I generate the xml file, the .net xml editor says "The active schema...
1
by: da_pander | last post by:
Hi, Can anyone tell me if it is possible to create a XSD schema document that will only allow certain elements to be displayed as available within the instance document depending on say a...
1
by: JoeZ | last post by:
Hi all, I am using XMLValidatingReader to validate xml instance against schema. Now my question is: in the schema, it has the target name space. In the instance, it doesn't have the name...
0
by: Chris O | last post by:
"Larry Lowe" <llowejr@usa.netwrote in message news:ad17577.0308140714.1b14d778@posting.google.com... Hi Larry. Some responses aren't very helpful. I'll try to do a little better. The first...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.