XML Doc from xsd Newbie question

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

Hi,
I am new to XML documents.
I have to write an app that will pass an XML document to a remote app. This
may be by remoting of a web service. Don't know yet.
The document structure has not been specified yet.
So I thought I could create an XML schema in my project with a best guess
structure. (mySchema.xsd)
When I come to the part where I want to create and send the xml document I
had expected to be able to create a doc based on mydoc.xsd in code.
eg. Pseudocode:
XMLDoc myDoc = new XMLDoc(mySchema);
myDoc.Node1.value="Data String"
etc etc.
Is this approach possible?
The only thing I can see is an external tool XSD.exe which will make classes
from xsd files.
I tried to feed it my schema but it gave an error 'Can only generate one of
classes or datasets'
Thanks
Bob
 
hmmm...
Think I may be off the track here.
Is the correct method to simply create a class that represents my best guess
of the XML schema and serialise an instance that for testing?
thanks
Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

XML document validation against XSD schema 1
XML DTDs Versus XML Schema 0
XSD Class 2
Xml and DataSet 5
Store XML/XSD in SQL Server 2008 3
Publishing an XSD 3
XSD against XML 1
One question about XML schemas 2

Back
Top