Click here to Skip to main content
15,898,373 members
Home / Discussions / C#
   

C#

 
GeneralRe: Interfaces Pin
DavidNohejl3-Jan-05 23:56
DavidNohejl3-Jan-05 23:56 
GeneralRe: Interfaces Pin
jan larsen4-Jan-05 0:48
jan larsen4-Jan-05 0:48 
GeneralRe: Interfaces Pin
DavidNohejl4-Jan-05 1:35
DavidNohejl4-Jan-05 1:35 
Generalabout the xmltextreader Pin
dhol2-Jan-05 19:29
dhol2-Jan-05 19:29 
GeneralRe: about the xmltextreader Pin
DavidNohejl3-Jan-05 9:35
DavidNohejl3-Jan-05 9:35 
GeneralRe: about the xmltextreader Pin
dhol3-Jan-05 16:36
dhol3-Jan-05 16:36 
GeneralRe: about the xmltextreader Pin
DavidNohejl4-Jan-05 1:30
DavidNohejl4-Jan-05 1:30 
GeneralRe: about the xmltextreader Pin
dhol4-Jan-05 17:45
dhol4-Jan-05 17:45 
Hi First of thank you for replying.

I have to read any schema file, and according to their datatype, it should load values for about 200 into a new xml file.

ie, a rough xml(first file -resulatant file)
<name>john1
<salary>8100
<name>john2
<salary>8200
<name>john3
<salary>8300
<name>john4
<salary>8400
like so on.. for about 200 values.

Now I have another xml file which has same "name" field all meaningful values for about 50.
(second xml file)
<name>john milton
<name>stephen
<name>george
<name>thomas
<name>paul like so on for about 50 data's.

Now coming to my program, when it reads the schema, and when the schema file has the field"name" then it should read the second file and insert the data's from second file into the first xml (resultant file) for that particular field.

This is my requirement.
and this is my coding done, after running this program i find the values for the particular field are changed to false.

private void button2_Click(object sender, System.EventArgs e)
{
dataSet1.ReadXmlSchema(txtSchema.Text);
foreach (DataTable dTbl in dataSet1.Tables)
{
for(int j = 0; j <= 20; j++)
{
object[] oValues = new object[dTbl.Columns.Count];
int i = 0;
foreach (DataColumn dColmn in dTbl.Columns)
{
switch(dColmn.DataType.ToString())
{
case "System.String":
if(dColmn.ColumnName.Equals("billto_name"))
{
XmlTextReader xtr = new XmlTextReader("C:\\CDEV\\testdatagenerator\\meelu.xml");
oValues[i] = ((xtr.NodeType == XmlNodeType.Element) && (xtr.Name == "billto_name"));
}
else
{
oValues[i] = (string) "sachin" + j;
}
break;
}
i = i+1;
}
dTbl.Rows.Add(oValues);
}
}
dataSet1.WriteXml(txtXml.Text,XmlWriteMode.WriteSchema );
}



santhosh
GeneralRe: about the xmltextreader Pin
dhol4-Jan-05 17:59
dhol4-Jan-05 17:59 
General'Locking' entire folder Pin
kshet262-Jan-05 18:34
kshet262-Jan-05 18:34 
GeneralRe: 'Locking' entire folder Pin
Dave Kreskowiak3-Jan-05 6:15
mveDave Kreskowiak3-Jan-05 6:15 
GeneralRe: 'Locking' entire folder Pin
kshet263-Jan-05 7:31
kshet263-Jan-05 7:31 
GeneralRe: 'Locking' entire folder Pin
Dave Kreskowiak3-Jan-05 7:45
mveDave Kreskowiak3-Jan-05 7:45 
GeneralRe: 'Locking' entire folder Pin
Dennis C. Dietrich3-Jan-05 7:50
Dennis C. Dietrich3-Jan-05 7:50 
GeneralRe: 'Locking' entire folder Pin
Dave Kreskowiak3-Jan-05 11:05
mveDave Kreskowiak3-Jan-05 11:05 
GeneralRe: 'Locking' entire folder Pin
Dennis C. Dietrich3-Jan-05 11:35
Dennis C. Dietrich3-Jan-05 11:35 
GeneralRe: 'Locking' entire folder Pin
Dave Kreskowiak4-Jan-05 16:43
mveDave Kreskowiak4-Jan-05 16:43 
GeneralRe: 'Locking' entire folder Pin
kshet263-Jan-05 9:36
kshet263-Jan-05 9:36 
GeneralRe: 'Locking' entire folder Pin
Dave Kreskowiak3-Jan-05 11:07
mveDave Kreskowiak3-Jan-05 11:07 
GeneralRe: 'Locking' entire folder Pin
kshet263-Jan-05 17:13
kshet263-Jan-05 17:13 
GeneralRe: 'Locking' entire folder Pin
Dave Kreskowiak4-Jan-05 16:50
mveDave Kreskowiak4-Jan-05 16:50 
Generalmousewheel!!! Pin
osto2-Jan-05 18:06
osto2-Jan-05 18:06 
GeneralPoll sample Pin
anandg_g2-Jan-05 17:04
anandg_g2-Jan-05 17:04 
GeneralTrouble with asynch sockets...program not exiting from taskmanager list Pin
FocusedWolf2-Jan-05 16:51
FocusedWolf2-Jan-05 16:51 
GeneralPassing Value Types by Reference Pin
paulsawyer2-Jan-05 16:44
paulsawyer2-Jan-05 16:44 

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.