Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

DATASET.READXML BUG!

ahollowayaholloway Member Posts: 7
I tried three of the DataSet's overloaded ReadXml Methods (stream,string, and XmlTextReader). They all failed to populate my DataSet. Try it yourself and let me know if it works for you. If you get it to work email me at aholloway@automark.net. I have attached the code below. Thanks!

private void mnuFile_Load_Click(object sender, System.EventArgs e)
{
try
{
if (cdOpenFile.ShowDialog() == DialogResult.OK)
{
/*XmlTextReader objXmlRdr = new XmlTextReader(cdOpenFile.OpenFile());
while(objXmlRdr.Read())
{
MessageBox.Show(objXmlRdr.Value);
}
*/
//objDs.ReadXml(new XmlTextReader(cdOpenFile.OpenFile()),XmlReadMode.IgnoreSchema);
//objDs.ReadXml(cdOpenFile.OpenFile(),XmlReadMode.IgnoreSchema);
objDs.ReadXml("C:\xml\inbox.xml",XmlReadMode.IgnoreSchema);
MessageBox.Show(objDs.GetXml());
/*DataTable myDt = objDs.Tables[0];
foreach (DataRow r in myDt.Rows)
MessageBox.Show(r[0].ToString());
*/
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}

Comments

  • Justin BibJustin Bib USAMember Posts: 0

    __ / http://forcoder.org / free video tutorials and ebooks about || Python, Scratch, C++, PL/SQL, Visual Basic .NET, MATLAB, Swift, C, Objective-C, C#, Go, Delphi, Assembly, Visual Basic, PHP, Perl, R, Java, JavaScript, Ruby Rust, Scheme, D, Transact-SQL, F#, Scala, Hack, Lua, Crystal, Bash, ABAP, Fortran, Lisp, LabVIEW, ML, FoxPro, SAS, Dart, Prolog, Alice, Ada, Awk, Kotlin, Erlang, Clojure, COBOL, Logo, VBScript, Julia, Apex || ________

Sign In or Register to comment.