Click here to Skip to main content
15,886,258 members
Home / Discussions / C#
   

C#

 
AnswerRe: Reference: Object reference not set to an instance of an object. Pin
Pete O'Hanlon24-Apr-12 5:08
mvePete O'Hanlon24-Apr-12 5:08 
GeneralRe: Reference: Object reference not set to an instance of an object. Pin
MemberDotNetting24-Apr-12 5:46
MemberDotNetting24-Apr-12 5:46 
GeneralRe: Reference: Object reference not set to an instance of an object. Pin
Pete O'Hanlon24-Apr-12 5:49
mvePete O'Hanlon24-Apr-12 5:49 
GeneralRe: Reference: Object reference not set to an instance of an object. Pin
MemberDotNetting24-Apr-12 6:31
MemberDotNetting24-Apr-12 6:31 
AnswerRe: Reference: Object reference not set to an instance of an object. Pin
Bernhard Hiller24-Apr-12 5:11
Bernhard Hiller24-Apr-12 5:11 
GeneralRe: Reference: Object reference not set to an instance of an object. Pin
MemberDotNetting24-Apr-12 6:34
MemberDotNetting24-Apr-12 6:34 
GeneralRe: Reference: Object reference not set to an instance of an object. Pin
Gerry Schmitz25-Apr-12 8:51
mveGerry Schmitz25-Apr-12 8:51 
QuestionDeserialize xml file having namespaces Pin
NarVish24-Apr-12 3:38
NarVish24-Apr-12 3: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 8:55
mveGerry Schmitz25-Apr-12 8:55 
QuestionComparing two files Pin
MichCl24-Apr-12 3:17
MichCl24-Apr-12 3:17 
AnswerRe: Comparing two files Pin
Sentenryu24-Apr-12 7:10
Sentenryu24-Apr-12 7:10 
GeneralRe: Comparing two files Pin
MichCl24-Apr-12 9:31
MichCl24-Apr-12 9:31 
Questionproject for face detection and recognition Pin
baskaran chellasamy24-Apr-12 2:10
baskaran chellasamy24-Apr-12 2:10 
AnswerCross posted. Pin
Pete O'Hanlon24-Apr-12 2:20
mvePete O'Hanlon24-Apr-12 2:20 
QuestionSql Compact Deployment with C# Pin
teknolog12323-Apr-12 23:27
teknolog12323-Apr-12 23:27 
QuestionASP.Net Pin
fire_hawk23-Apr-12 21:49
fire_hawk23-Apr-12 21:49 
AnswerRe: ASP.Net Pin
Mycroft Holmes23-Apr-12 21:58
professionalMycroft Holmes23-Apr-12 21:58 
GeneralRe: ASP.Net Pin
Pete O'Hanlon23-Apr-12 22:05
mvePete O'Hanlon23-Apr-12 22:05 
GeneralRe: ASP.Net Pin
Vipin_Arora24-Apr-12 1:16
Vipin_Arora24-Apr-12 1:16 
Questionjagged array error message Pin
mpvkrishnadhar23-Apr-12 20:16
mpvkrishnadhar23-Apr-12 20:16 
AnswerRe: jagged array error message Pin
Satish Pai23-Apr-12 20:59
Satish Pai23-Apr-12 20:59 
GeneralRe: jagged array error message Pin
mpvkrishnadhar23-Apr-12 21:14
mpvkrishnadhar23-Apr-12 21:14 
AnswerRe: jagged array error message Pin
Richard MacCutchan23-Apr-12 21:23
mveRichard MacCutchan23-Apr-12 21:23 
AnswerRe: jagged array error message Pin
OriginalGriff23-Apr-12 21:37
mveOriginalGriff23-Apr-12 21:37 
GeneralRe: jagged array error message Pin
mpvkrishnadhar23-Apr-12 22:08
mpvkrishnadhar23-Apr-12 22: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.