XML Serializer

  • Thread starter Thread starter beachboy
  • Start date Start date
B

beachboy

Hello all,

I want to generate xml with serialization. I write a class for 2nd level
Element <SchoolInfo>, but how to handle the <Staffs> Element and create
repeated <Student> Element and own attributes.
format as below:

<School>
<SchoolInfo>
<Name>
<Address>
<Tel>
</SchoolInfo>
<Students>
<Student id="2" name="student2">
<Student id="4" name="student4">
</Students>
</School>

btw, any good serialization web articles I can read as well??

Thanks in advanced.
 
Just create a XML schema (.xsd) file then read up on the xsd tool which you
will find in the SDK\bin directory of your installation. This then generate
the required classes for you.

If you are using express you will have to do the schema by hand.
If you have a full edition then just use new XML schema and use the graphic
view.
 

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

Back
Top