Last post Mar 06, 2019 08:05 AM by slb2012
Mar 06, 2019 01:31 AM|slb2012|LINK
Which of the following statements is True
dataSet ds = new DataSet();
ds.ReadXML("..\..\states.xml", XmlReadMode Auto);
I think the right answer will be number 2, correct?
Your help is appreciated. Thanks
Mar 06, 2019 06:48 AM|Ackerly Xu|LINK
It depends , if the first parameter ..\..\states.xml truly refers to an xml file and it is well-formatted, the code could run successfully.
For example, if my code is
DataSet set = new DataSet();
Then I should have dataset.xml in my folder xmlDemo at root path of my project.
And below is my xml. song will be the table name, artist,album,genre .. . will be the column name.
<album>Grown and sexy</album>
<album>Not going under</album>
Mar 06, 2019 08:05 AM|slb2012|LINK
Thank you for the little orientation you gave me of the XML DataSet path. Yes, if well-formatted, the code could run successfully that is the right answer.