Question: a 1 3 . Simpose that records for students ( otn , name, surname ) have been stored in a xML fle ( students ami

a13. Simpose that records for students (otn, name, surname) have been stored in a xML fle (students ami). Which code checks if the sludent number entered by user (to textbosi) already exists in the file?
a xoociment Liat = xoocument 1.
iftestilonI. Text wnodel MestageBos. Sho 'stn')
foreach (var nade in Ust. Eiements [" student').Elements (" sta"))
if(textBox1. Text=nnode Value). MessageSox Show("Already Existst7'?
foreach (var node in Lit("student"). Elements("stn"))
If(textBov1 Text ranode) MessageBox.Show('Atready Exists)');
d. XElement Las = XElement. Load['d///students mm):
foreach (var node in List Elements('student") Elements("stn"))
If(textbox]. Text anode) MessageBox.Show ("Already Existsi'?)
 a13. Simpose that records for students (otn, name, surname) have been

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!