472,090 Members | 1,327 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,090 software developers and data experts.

Problem with DataSet.ReadXML with valid Schema

I'm having trouble loading some xml data into a dataset via the ReadXML
call. I'm loading into the dataset an xml schema prior to the ReadXML call.
I see that there IS in fact, 3 records that should be created in the dataset
with the provided xml. However, after the ReadXML statement there are no
rows in the DataSet.Tables[0] ? IS there something I'm missing? I can
assure you that the schema is correct, since it was originally created with
the data using the DataSet.WriteXMLSchema method.

here is the example code I'm using:

// call the web service and get the returned xml

xmlOutput = webService.TodaysEvents( "", ipAddress, "", "", "", "", "", "",
"", "", "", "" );

// read in the xml

xmlStringReader = new System.IO.StringReader( xmlOutput );

// create the dataset

data = new DataSet();

// set the schema to check against

data.ReadXmlSchema( Server.MapPath(
"outputSchemas/OLITSBroadcastTodaysEvents.xsd" ) );

// convert the data into a dataset

data.ReadXml( xmlStringReader );

Thanks,
Nov 12 '05 #1
1 4607
It's hard to say what's going wrong without the relevant sections from
schema file and the data beeing loaded. Will it be possible to post them ?

--
Daniel D.C. [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights

"Jeffrey A. Voigt" <vo***********@myfloridahouse.com> wrote in message
news:uT**************@TK2MSFTNGP12.phx.gbl...
I'm having trouble loading some xml data into a dataset via the ReadXML
call. I'm loading into the dataset an xml schema prior to the ReadXML call. I see that there IS in fact, 3 records that should be created in the dataset with the provided xml. However, after the ReadXML statement there are no
rows in the DataSet.Tables[0] ? IS there something I'm missing? I can
assure you that the schema is correct, since it was originally created with the data using the DataSet.WriteXMLSchema method.

here is the example code I'm using:

// call the web service and get the returned xml

xmlOutput = webService.TodaysEvents( "", ipAddress, "", "", "", "", "", "", "", "", "", "" );

// read in the xml

xmlStringReader = new System.IO.StringReader( xmlOutput );

// create the dataset

data = new DataSet();

// set the schema to check against

data.ReadXmlSchema( Server.MapPath(
"outputSchemas/OLITSBroadcastTodaysEvents.xsd" ) );

// convert the data into a dataset

data.ReadXml( xmlStringReader );

Thanks,

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Derek Andrew | last post: by
2 posts views Thread by MarkAurit | last post: by
22 posts views Thread by Arne | last post: by
reply views Thread by Matt | last post: by
1 post views Thread by Angel \Java\ Lopez | last post: by
4 posts views Thread by =?Utf-8?B?anAybXNmdA==?= | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.