in Education by
Good day, I am going to try be as breif but informative as possible, I am using asp.net 3.5 and C#, basically what I am attempting to do is collect information from a xml file I recieve from a HTTPRequest. However using the usual dataset.readxml is not working for me. Please take a minute to look through everything before posting any answers. I recieve xml that looks like this: (I have removed some information but am happy to supply the full XML set that I recieve as I am trying not to spam this with rubbish info) 36547986 Yahunn Digital Printers DTRJ 155512 BANNERS 15530694.GIF I attempt to read it using the following: HttpWebRequest request = WebRequest.Create(builder.Uri) as HttpWebRequest; using (HttpWebResponse response = request.GetResponse() as HttpWebResponse) { // Get the response stream StreamReader readerSR = new StreamReader(response.GetResponseStream()); // Console application output //lblReturn.Text = readerSR.ReadToEnd().ToString(); DataSet XMLDataSet = new DataSet(); XMLDataSet.ReadXml(readerSR); dgvResults.DataSource = XMLDataSet.Tables[9].DefaultView; dgvResults.DataBind(); }; But the simple answer is that this does not return a proper set of information to populate the gridview with. The table XMLDataSet.Tables[7].Rows.Count.ToString() contains 223 rows, which is completely incorrect, with the xml I gave that is 1 result(ofcourse I left out 216 "fields" which are returned for the example) but it seems it is creating a row for each "FIELD". My question is, how would I either get the information into a DataGridView, or should I be doing something enirely different to display this information? The reason I would like to use a gridview is purely because I am confrtable with the customization of a gridview. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
You have a wrong XML schema so you cant read the XML file so the problem that you cant load the XML. please try to fix xml schema befor render to grid view QUERY="string("printers")" => QUERY="string('printers')" Note that the '&' destroy the XML and cause a render error so i used to replace it by %26%. and the close tag for the root tag [SEGMENTS] hope this will help you

Related questions

0 votes
    So the problem is i don't get get a value from textbox field on GridView RowUpdating event. Here ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 8, 2022 in Education by JackTerrance
0 votes
    I have been developing a webpage which uses n number of dropdownlists which are binding dynamically inside a ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 18, 2022 in Education by JackTerrance
0 votes
    I need to pull item quantity from a DB2 database from an aspx page and then update after the quantity ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 5, 2022 in Education by JackTerrance
0 votes
    I'm trying to create a menu for my web site programmatically from an xml file. The menu has three ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
0 votes
    I want to make a button Go To Cart visible after adding a product into cart. But when page gets ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 3, 2022 in Education by JackTerrance
0 votes
    I have a fileupload option in my project. It inclueds a query which returns a dataset. It works fine ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 18, 2022 in Education by JackTerrance
0 votes
    I have a master page with a form element and the defaultbutton attribute set to a server-side ImageButton. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 16, 2022 in Education by JackTerrance
0 votes
    I have a Login control placed inside LoginView control contained within a PANEL. I want to set login button ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 8, 2022 in Education by JackTerrance
0 votes
    I am developing solution where there are three webapi projcets. Each of them is secured with JWT tokens ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 2, 2022 in Education by JackTerrance
0 votes
    All How can I download a file so the user sees that it is downloading (like with a stream?) I ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 2, 2022 in Education by JackTerrance
0 votes
    I'm working on a DNN skin using Christoc's DNN templates and when I create a normal ASP.NET ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 26, 2022 in Education by JackTerrance
0 votes
    I have two submit buttons and a few textboxes on my page. When I enter details in the textbox and hit ... model.FirsttName) @Html.TextBoxFor(model => model.LastName) Get History...
asked May 22, 2022 in Education by JackTerrance
0 votes
    Description: I have a solution in Visual Studio which has multiple projects as application layers. Business Logic ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
0 votes
    I have two submit buttons and a few textboxes on my page. When I enter details in the textbox and hit ... model.FirsttName) @Html.TextBoxFor(model => model.LastName) Get History...
asked May 17, 2022 in Education by JackTerrance
0 votes
    Description: I have a solution in Visual Studio which has multiple projects as application layers. Business Logic ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 14, 2022 in Education by JackTerrance
...