Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

what are the advantages and disadvantages of using XML schemas?

0
Posted

what are the advantages and disadvantages of using XML schemas?

0

Unfortunately even the authoring body of XSD (W3C) understands that XSD is a pretty bad technology. That said, it’s intention isn’t necessarily bad. One of C#’s major benefits is that it is statically typed. Statically typing your XML documents gives them the same benefits. What’s probably best here is reverse engineering your classes to produce the Schema using the XML serialization attributes. When you do this C# will create a custom data reader for your XML file which will dramatically improve performance. One of the biggest costs of XML is that it has to be string parsed. The more assumptions you can make about your XML files (e.g. their structure), the better your performance is likely to be. So ultimately like many things, is their enough of a need for performance benefits to justify the costs in developer time. Or is there a strong enough desire to use statically typed systems to justify the cost of writing the XSD. Ultimately your project needs will dictate what you should do,

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123