C# .NET - how can I display data to textboxes from XML, i can on grid but not textboxes

Asked By Sulma on 18-Jul-18 06:19 PM
 Note: i can Display it on the grid but am having trouble displaying it on textbox.


if (total > 0)
            {
                XmlDoc.LoadXml(M_RegulaReader.CheckReaderResultXML((int) eRPRM_ResultType.RPRM_ResultType_OCRLexicalAnalyze,0,0));

                NoList = XmlDoc.GetElementsByTagName("Document_Field_Analysis_Info");

                for (i = 0; i< NoList.Count; i++)
                {
                    DocXml = (XmlElement)NoList.Item(i);
                    //XmlDoc.Save("data.xml");
                //   j = GridAnalyze.Rows.Add();

                    // this is text field type equal to one of enum eVisualFieldType value 
                    int FieldType = Convert.ToInt32(DocXml.GetElementsByTagName("Type").Item(0).InnerText);

                    // this is text field LCID value. For Latin text is equal to 0
                    int LCID = Convert.ToInt32(DocXml.GetElementsByTagName("LCID").Item(0).InnerText);
                   // string caption = eVisualFieldType.GetName(typeof(eVisualFieldType), FieldType);

                    if (LCID > 0)
                        //       caption += string.Format("({0})", LCID);

                   //    GridAnalyze.Rows[j].Cells[1].Value = DocXml.GetElementsByTagName("Field_MRZ").Item(0).InnerText;

                    TxtDocClassCode.Text= DocXml.GetElementsByTagName("ft_Document_Class_Code")[0].InnerText;
                    TxtIssuingStateCode.Text = DocXml.GetElementsByTagName("ft_Issuing_State_Code")[0].InnerText;
                    TxtDoc.Text = DocXml.GetElementsByTagName(" ft_Document_Number")[2].InnerText;
                    DtpDateOfExpiry.Text = DocXml.GetElementsByTagName("ft_Date_of_Expiry")[3].InnerText;
                    //TxtMRZLines.Text = DocXml.GetElementsByTagName("MRZ_Lines")[0].InnerText;
                    //TxtMRZType.Text = DocXml.GetElementsByTagName("MRZ_Type")[0].InnerText;
                    //TxtSurnameGivenNames.Text = DocXml.GetElementsByTagName("Surname and Given Names")[25].InnerText;
                    //TxtGivenNames.Text = DocXml.GetElementsByTagName("Given Names")[9].InnerText;
                    //TxtNationalityCode.Text = DocXml.GetElementsByTagName("Nationality Code")[26].InnerText;
                    //TxtSex.Text = DocXml.GetElementsByTagName("Sex")[12].InnerText;
                    //DtpDOB.Text = DocXml.GetElementsByTagName("Date of Birth")[5].InnerText;
                    //TxtDOBDigit.Text = DocXml.GetElementsByTagName("Check Digit of date of Birth")[81].InnerText;
                    
                    //TxtChckDigitOFExpDate.Text = DocXml.GetElementsByTagName("Check Digit of date of Expiry")[82].InnerText;
                    
                    //TxtChckDigOFDocNo.Text = DocXml.GetElementsByTagName("Check Digit of Document Number")[80].InnerText;
                    //TxtOptionalData.Text = DocXml.GetElementsByTagName("Optional Data")[36].InnerText;
                    //TxtChckDigOfOptData.Text = DocXml.GetElementsByTagName("Check Digit of Optional Data")[195].InnerText;
                    //TxtFinalChckDig.Text = DocXml.GetElementsByTagName("Final Check Digit")[84].InnerText;


                }
            }