Groups | Blog | Home
all groups > dotnet xml > august 2006 >

dotnet xml : Schema Question



randy
8/28/2006 9:03:11 PM
Hi,

I am fairly new to XML schemas and why to use them. I am integrating with
another application via xml. My questions are schemas only good to validate
the XML documents or can I use the schema to help me parse the xml document?

Thanks

ankitasdeveloper NO[at]SPAM gmail.com
8/29/2006 4:35:08 AM
Well, following link will be useful to you.
http://www.w3schools.com/schema/schema_why.asp


~ Ankit
http://ankitjain.info/ankit/2006/07/01/forcing-download-on-web-page


[quoted text, click to view]
randy
8/29/2006 11:05:00 AM
Thanks for the posts. Is there a good example how to use a schema to map to
class in .Net?

Thanks

[quoted text, click to view]

John Saunders
8/29/2006 12:38:04 PM
[quoted text, click to view]

If you're new to XML, the last thing you need is to be parsing XML which you
_think_ matches the schema, only to find out days later that the bug you've
been chasing is actually in the data.

Don't downplay schema validation. It will save you many hours.

John

Martin Honnen
8/29/2006 3:38:41 PM


[quoted text, click to view]


[quoted text, click to view]

Well you can generally parse an XML document without validating or
having a schema.

On the other hand schemas are by now often used to map XML to classes in
a framework (e.g. .NET framework) or programming language (e.g. Java) to
enable your code do directly access a parsed XML document as an instance
of a class where you have typed members.

And web services using SOAP for instance might do there type marshalling
based on XSD schema description.

--

Martin Honnen --- MVP XML
Martin Honnen
8/29/2006 7:14:29 PM


[quoted text, click to view]

A quickstart sample is here
<http://samples.gotdotnet.com/quickstart/howto/doc/xmlserialization/XSDFromCls.aspx>


--

Martin Honnen --- MVP XML
AddThis Social Bookmark Button