Click here to Skip to main content
16,005,178 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to make the service to get stopped by itself once it has performed its job? Pin
Gilly Kumar24-May-09 3:02
Gilly Kumar24-May-09 3:02 
QuestionPostMessage a mouse click without bringing the target window into focus?? Pin
FocusedWolf23-May-09 11:52
FocusedWolf23-May-09 11:52 
AnswerRe: PostMessage a mouse click without bringing the target window into focus?? Pin
Luc Pattyn23-May-09 12:00
sitebuilderLuc Pattyn23-May-09 12:00 
QuestionWaiting for response in NetworkStream Pin
Quake2Player23-May-09 9:34
Quake2Player23-May-09 9:34 
AnswerRe: Waiting for response in NetworkStream Pin
Eddy Vluggen23-May-09 21:15
professionalEddy Vluggen23-May-09 21:15 
AnswerRe: Waiting for response in NetworkStream Pin
Quake2Player23-May-09 21:21
Quake2Player23-May-09 21:21 
GeneralRe: Waiting for response in NetworkStream Pin
Luc Pattyn24-May-09 1:38
sitebuilderLuc Pattyn24-May-09 1:38 
QuestionReading XML File Pin
M_Aurelius23-May-09 8:26
M_Aurelius23-May-09 8:26 
Hi,

I am trying to read an xml file into a dataset and have been met with nothing but problems.

The xml file is in the following format:

<?xml version="1.0"?><br />
<Catalog xmlns:dt="dt"><br />
<Rec><br />
<ITEM dt:dt="string"></ITEM><br />
<QTY dt:dt="string">1</QTY><br />
<SUB dt:dt="string"></SUB><br />
<CATALOG dt:dt="string">ABC123</CATALOG><br />
</Rec><br />
</Catalog>


I have tried this code in C#:
<br />
Dataset ds = new DataSet("Test");<br />
ds.ReadXML(OFD.FileName);<br />


The touble is that all have in the Dataset is a table called "Rec" and one column called "Rec_Id", clearly this is not what I want!!

If I remove the dt:dt="String" datatypes then everything is fine.

I think this can be done by specifing a schema, but I do not know how you do this whilst reading into a dataset nor do I know enough about schemas to know what to specify where!!

Can anyone help?

Thanks
AnswerRe: Reading XML File Pin
Henry Minute23-May-09 14:02
Henry Minute23-May-09 14:02 
AnswerRe: Reading XML File Pin
Mycroft Holmes23-May-09 14:10
professionalMycroft Holmes23-May-09 14:10 
GeneralRe: Reading XML File Pin
M_Aurelius23-May-09 22:00
M_Aurelius23-May-09 22:00 
QuestionCopying the current executing program to destination Pin
Rajdeep.NET is BACK23-May-09 7:57
Rajdeep.NET is BACK23-May-09 7:57 
AnswerRe: Copying the current executing program to destination Pin
Douglas Troy23-May-09 8:10
Douglas Troy23-May-09 8:10 
GeneralRe: Copying the current executing program to destination Pin
Rajdeep.NET is BACK23-May-09 17:20
Rajdeep.NET is BACK23-May-09 17:20 
AnswerRe: Copying the current executing program to destination Pin
DaveyM6923-May-09 8:42
professionalDaveyM6923-May-09 8:42 
GeneralRe: Copying the current executing program to destination Pin
Rajdeep.NET is BACK23-May-09 17:10
Rajdeep.NET is BACK23-May-09 17:10 
GeneralRe: Copying the current executing program to destination Pin
Dave Kreskowiak23-May-09 17:26
mveDave Kreskowiak23-May-09 17:26 
GeneralRe: Copying the current executing program to destination Pin
DaveyM6923-May-09 22:58
professionalDaveyM6923-May-09 22:58 
GeneralRe: Copying the current executing program to destination Pin
Rajdeep.NET is BACK24-May-09 0:04
Rajdeep.NET is BACK24-May-09 0:04 
GeneralRe: Copying the current executing program to destination Pin
DaveyM6924-May-09 0:45
professionalDaveyM6924-May-09 0:45 
AnswerRe: Copying the current executing program to destination Pin
fly90423-May-09 11:00
fly90423-May-09 11:00 
GeneralRe: Copying the current executing program to destination Pin
Rajdeep.NET is BACK23-May-09 16:44
Rajdeep.NET is BACK23-May-09 16:44 
GeneralRe: Copying the current executing program to destination Pin
Dave Kreskowiak23-May-09 17:27
mveDave Kreskowiak23-May-09 17:27 
GeneralRe: Copying the current executing program to destination Pin
fly90424-May-09 0:10
fly90424-May-09 0:10 
QuestionConversion of visio files(.vsd) to .pdf files Pin
NarVish23-May-09 6:42
NarVish23-May-09 6:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.