XSD.EXE /CLASSES does not give LoadFromXml and WriteToXml methods...

Posted on 2007-07-30
Last Modified: 2013-12-17
I am using C# 1.1. I have an XSD that I want to use to maintain XML files. I tried generating the DataSet out of this XSD to do this, but the DataSet was too confusing with all the tables and columns. So I ended up creating classes for this schema using:

xsd.exe /c /n:<my namespace> File.xsd

The class came out the way I want to, but this class does not have LoadXml or WriteXml type methods. Without these methods, it would be tough for me to handle the XML. Shouldn't the generated class already contain these methods? How do I get these methods?
Question by:srinivas_vemla
    1 Comment
    LVL 37

    Accepted Solution

    You just use the XML serializer on the document and it generates the classes... The opposite is you take the classes and use the XML serializer and it generates a document.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now