Click here to Skip to main content
15,909,051 members
Home / Discussions / C#
   

C#

 
GeneralRe: Synchnroization with lock statement Pin
xkrja30-Mar-10 22:26
xkrja30-Mar-10 22:26 
QuestionProgresBar Pin
Anil Kumar.Arvapalli30-Mar-10 20:20
Anil Kumar.Arvapalli30-Mar-10 20:20 
AnswerRe: ProgresBar Pin
Khaniya30-Mar-10 20:24
professionalKhaniya30-Mar-10 20:24 
QuestionPlay sound Pin
jojoba201130-Mar-10 20:06
jojoba201130-Mar-10 20:06 
AnswerRe: Play sound Pin
Khaniya30-Mar-10 20:18
professionalKhaniya30-Mar-10 20:18 
QuestionRe: Play sound [modified] Pin
jojoba201130-Mar-10 21:10
jojoba201130-Mar-10 21:10 
AnswerRe: Play sound Pin
Kristian Sixhøj31-Mar-10 0:14
Kristian Sixhøj31-Mar-10 0:14 
QuestionXml Deserialization Pin
VCsamir30-Mar-10 19:43
VCsamir30-Mar-10 19:43 
hi friends,



i am using xmlclass serailization to read the Xml File

///<Order xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" orderId="1" version="3.1.0" xmlns="http://www.abc.com/schemas/imaging/rps/order/2007/01/" ///>



</order>

XmlTextReader reader = new XmlTextReader(filename);

try

{

XmlSerializer serializer = new XmlSerializer(typeof(Class_name));

Class_object = (Class_name)serializer.Deserialize(reader);

reader.Close();

}

catch (Exception e)

{

reader.Close();

return;

}



it says that "{<Order xmlns='http://www.abc.com/schemas/imaging/rps/order/2007/01/>' was not expected."}"



my class defination is as follows

[XmlRoot("Order")]

public class Class_name

{

[XmlAttribute]

public string orderId;

[XmlAttribute]

public string version;



//default constructor

}

}



Can Anyone help me to resolve this!!
AnswerRe: Xml Deserialization Pin
Arun Jacob30-Mar-10 20:09
Arun Jacob30-Mar-10 20:09 
GeneralRe: Xml Deserialization Pin
VCsamir30-Mar-10 21:37
VCsamir30-Mar-10 21:37 
AnswerRe: Xml Deserialization Pin
Mirko198030-Mar-10 21:43
Mirko198030-Mar-10 21:43 
GeneralRe: Xml Deserialization Pin
VCsamir4-Apr-10 20:21
VCsamir4-Apr-10 20:21 
QuestionPassing Value From One Form To Another! [modified] Pin
Sr...Frank30-Mar-10 18:22
Sr...Frank30-Mar-10 18:22 
AnswerRe: Passing Value From One Form To Another! Pin
Anubhava Dimri30-Mar-10 18:27
Anubhava Dimri30-Mar-10 18:27 
AnswerRe: Passing Value From One Form To Another! Pin
Praveen Raghuvanshi30-Mar-10 18:45
professionalPraveen Raghuvanshi30-Mar-10 18:45 
GeneralRe: Passing Value From One Form To Another! Pin
Sr...Frank30-Mar-10 18:56
Sr...Frank30-Mar-10 18:56 
GeneralRe: Passing Value From One Form To Another! Pin
Praveen Raghuvanshi30-Mar-10 21:43
professionalPraveen Raghuvanshi30-Mar-10 21:43 
AnswerRe: Passing Value From One Form To Another! Pin
DaveyM6931-Mar-10 0:43
professionalDaveyM6931-Mar-10 0:43 
QuestionRepositioning the cursor Pin
skhan1730-Mar-10 12:49
skhan1730-Mar-10 12:49 
AnswerRe: Repositioning the cursor Pin
PIEBALDconsult30-Mar-10 12:56
mvePIEBALDconsult30-Mar-10 12:56 
AnswerRe: Repositioning the cursor Pin
skhan1730-Mar-10 13:11
skhan1730-Mar-10 13:11 
AnswerRe: Repositioning the cursor Pin
Paw Jershauge30-Mar-10 13:24
Paw Jershauge30-Mar-10 13:24 
GeneralRe: Repositioning the cursor Pin
skhan1730-Mar-10 13:36
skhan1730-Mar-10 13:36 
GeneralRe: Repositioning the cursor Pin
Paw Jershauge30-Mar-10 13:40
Paw Jershauge30-Mar-10 13:40 
GeneralRe: Repositioning the cursor Pin
Paw Jershauge30-Mar-10 13:53
Paw Jershauge30-Mar-10 13:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.