sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
andrewcw's Avatar

serialization crash at root node ??


Question posted by: andrewcw (Guest) on November 11th, 2005 10:51 PM
I made one C sharp class that was successful with the XSD
utility in the SDK bin. However now I can't get any xml
file to work with the other generated classes. The
serialization always stops on the first character of the
root node. I am pulling my hair out because I am now stuck
way behind schedule. 2 days trying to figure out what
could be corrupted or what error I am making. Additional
information: There is an error in XML document (2, 2).

<?xml version="1.0" encoding="UTF-8"?>
<mystatus>
<record who="fred"></record>
<record who="smith"></record>
</mystatus>


//---------------------------------------------------------
---------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.0.3705.209
//
// Changes to this file may cause incorrect behavior
and will be lost if
// the code is regenerated.
// </autogenerated>
//---------------------------------------------------------
---------------------

//
// This source code was auto-generated by xsd,
Version=1.0.3705.209.
//
namespace awqc {
using System.Xml.Serialization;


/// <remarks/>
[System.Xml.Serialization.XmlRootAttribute("mystatus",
Namespace="", IsNullable=false)]
public class mystatus {

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute
("record")]
public mystatusRecord[] record;
}

/// <remarks/>
public class mystatusRecord {

/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute()]
public string who;
}
}

1 Answer Posted
Oleg Tkachenko's Avatar
Guest - n/a Posts
#2: Re: serialization crash at root node ??

andrewcw wrote:
[color=blue]
> I made one C sharp class that was successful with the XSD
> utility in the SDK bin. However now I can't get any xml
> file to work with the other generated classes. The
> serialization always stops on the first character of the
> root node. I am pulling my hair out because I am now stuck
> way behind schedule. 2 days trying to figure out what
> could be corrupted or what error I am making. Additional
> information: There is an error in XML document (2, 2).[/color]

Your example works fine for me (actually it's too simple to not work). It's
not clear what do you mean by "to work with the other generated classes".
Provide more information about what are you trying to achieve, please.
Are you experiencing above problem during serialization or deserialization
process?
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

 
Not the answer you were looking for? Post your question . . .
196,831 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 196,831 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors