Click here to Skip to main content
15,123,509 members
Home / Discussions / C#
   

C#

 
AnswerRe: Reference: Object reference not set to an instance of an object. Pin
Pete O'Hanlon24-Apr-12 6:08
mvePete O'Hanlon24-Apr-12 6:08 
GeneralRe: Reference: Object reference not set to an instance of an object. Pin
MemberDotNetting24-Apr-12 6:46
MemberMemberDotNetting24-Apr-12 6:46 
GeneralRe: Reference: Object reference not set to an instance of an object. Pin
Pete O'Hanlon24-Apr-12 6:49
mvePete O'Hanlon24-Apr-12 6:49 
GeneralRe: Reference: Object reference not set to an instance of an object. Pin
MemberDotNetting24-Apr-12 7:31
MemberMemberDotNetting24-Apr-12 7:31 
AnswerRe: Reference: Object reference not set to an instance of an object. Pin
Bernhard Hiller24-Apr-12 6:11
MemberBernhard Hiller24-Apr-12 6:11 
GeneralRe: Reference: Object reference not set to an instance of an object. Pin
MemberDotNetting24-Apr-12 7:34
MemberMemberDotNetting24-Apr-12 7:34 
GeneralRe: Reference: Object reference not set to an instance of an object. Pin
Gerry Schmitz25-Apr-12 9:51
mveGerry Schmitz25-Apr-12 9:51 
QuestionDeserialize xml file having namespaces Pin
NarVish24-Apr-12 4:38
MemberNarVish24-Apr-12 4:38 
I would like to deserialize the below xml file. I used the below code. It returned exception:"There is an error in XML document (0, 0)."

XmlReader txtReader = XmlReader.Create(reader.BaseStream); 
XmlSerializer deSerializer = new XmlSerializer(typeof(ResponseType));
ResponseType resp = (ResponseType)deSerializer.Deserialize(txtReader);

Note:reader.BaseStream contains the below xml
xml file:
------------
<ns1:newResponse xmlns:ns1="http://xyz.com/datacq/xx/service">
<ns1:info>112200eed1b00e42a061</ns1:info>
</ns1:newResponse>


entry in xsd file :
-------------------
<xs:element name="addMemberResponse" type="ns:ResponseType" /> 


Class file
----------
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.1432")]
        [System.SerializableAttribute()]
        [System.Diagnostics.DebuggerStepThroughAttribute()]
        [System.ComponentModel.DesignerCategoryAttribute("code")]
        [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://xyz.com/datacq/xx/service")]
        [System.Xml.Serialization.XmlRootAttribute("addMemberResponse", Namespace = "http://xyz.com/datacq/xx/service", IsNullable = false)]
        public partial class ResponseType
        { 
            private string info; 
            public string Info
            {
                get
                {
                    return this.info;
                }
                set
                {
                    this.info = value;
                }
            }
         }

AnswerRe: Deserialize xml file having namespaces Pin
Gerry Schmitz25-Apr-12 9:55
mveGerry Schmitz25-Apr-12 9:55 
QuestionComparing two files Pin
MichCl24-Apr-12 4:17
MemberMichCl24-Apr-12 4:17 
AnswerRe: Comparing two files Pin
Sentenryu24-Apr-12 8:10
MemberSentenryu24-Apr-12 8:10 
GeneralRe: Comparing two files Pin
MichCl24-Apr-12 10:31
MemberMichCl24-Apr-12 10:31 
Questionproject for face detection and recognition Pin
baskaran chellasamy24-Apr-12 3:10
Memberbaskaran chellasamy24-Apr-12 3:10 
AnswerCross posted. Pin
Pete O'Hanlon24-Apr-12 3:20
mvePete O'Hanlon24-Apr-12 3:20 
QuestionSql Compact Deployment with C# Pin
teknolog12324-Apr-12 0:27
Memberteknolog12324-Apr-12 0:27 
QuestionASP.Net Pin
fire_hawk23-Apr-12 22:49
Memberfire_hawk23-Apr-12 22:49 
AnswerRe: ASP.Net Pin
Mycroft Holmes23-Apr-12 22:58
professionalMycroft Holmes23-Apr-12 22:58 
GeneralRe: ASP.Net Pin
Pete O'Hanlon23-Apr-12 23:05
mvePete O'Hanlon23-Apr-12 23:05 
GeneralRe: ASP.Net Pin
Vipin_Arora24-Apr-12 2:16
MemberVipin_Arora24-Apr-12 2:16 
Questionjagged array error message Pin
mpvkrishnadhar23-Apr-12 21:16
Membermpvkrishnadhar23-Apr-12 21:16 
AnswerRe: jagged array error message Pin
Satish Pai23-Apr-12 21:59
MemberSatish Pai23-Apr-12 21:59 
GeneralRe: jagged array error message Pin
mpvkrishnadhar23-Apr-12 22:14
Membermpvkrishnadhar23-Apr-12 22:14 
AnswerRe: jagged array error message Pin
Richard MacCutchan23-Apr-12 22:23
mveRichard MacCutchan23-Apr-12 22:23 
AnswerRe: jagged array error message Pin
OriginalGriff23-Apr-12 22:37
mveOriginalGriff23-Apr-12 22:37 
GeneralRe: jagged array error message Pin
mpvkrishnadhar23-Apr-12 23:08
Membermpvkrishnadhar23-Apr-12 23:08 

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.