473,385 Members | 1,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

serialization crash at root node ??

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("mystatu s",
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;
}
}

Nov 11 '05 #1
1 1391
andrewcw wrote:
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).


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

Nov 11 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: gael.pegliasco | last post by:
Hi, How are you dear and nice helper :) ? I'm trying to test xpath with this simple program : import xml.dom.minidom from xml.xpath.Context import Context import xml.xpath
4
by: Alex | last post by:
It seems that XML Serializatoin automatically puts certain XSD attributs in the root node. How can I control the root node attributes emitted to something more custom so I can preserve my schema...
16
by: Bob Rock | last post by:
Hello, when serializing an array of elements of a class Classname using XmlSerializer.Serialize() I get an XML like the following: <?xml version="1.0"> <ArrayOfClassname> ....... ..........
1
by: MattBell | last post by:
I have an object which serializes to XML. It's root node references the namespace I'm working with, but I would like to preferace the root node with a namespace reference (ie ns1:RootNode) is...
0
by: rein.petersen | last post by:
Hi All, Some of you may have encountered complications when trying to serialize an object derived from CollectionBase (implementing ICollection or IEnumerable). Specifically, the...
5
by: NG | last post by:
Hi, We are having DB2-V7.2 DB on AIX 5.2 machine. Recently we upgraded our system to fixpack 13 and activated activate AIX asynchronous IO function. Our DB is going to crash recovery with...
8
by: Eric Eggermann | last post by:
I'm having a problem with really large file sizes when serializing the classes that describe my little document. There are some circular references which result in the same object getting written...
1
by: Chuck Bowling | last post by:
Up front, i'm not very good with serialization and i'm not quite sure what capabilities it has. I have an app that outputs a text file with this format: <root> \t <node1> \t\t text... \t...
3
by: GreyAlien007 | last post by:
I extended the class TreeNode to add some properties of my liking. Anyway, no problems there, I can add my derived TreeNode into TreeNodeCollections and use the properties etc. However, when I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.