-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: pinga
Message 2 in Discussion
hi
try
this, if it helps u
u can
read a xml document
XmlDocument xmlDoc = new
XmlDocument();
xmlDoc.Load(Server.MapPath("test"));
XmlElement xmlele =
(XmlElement)xmlDoc.DocumentElement;
txttest1.Text = Server.HtmlDecode(xmlele["test1"].InnerText);
txttest2.Text = Server.HtmlDecode(xmlele["test2"].InnerText);
writing
a xml document
XmlTextWriter writer =
new
XmlTextWriter(Server.MapPath("test.xml"),Encoding.UTF8);
writer.WriteStartDocument();
writer.WriteStartElement("RiskWizardHelp");
writer.WriteStartElement("test1");
writer.WriteElementString("test1", Server.HtmlEncode(txttest1.Text.Trim()));
writer.WriteEndElement();
writer.WriteStartElement("test2");
writer.WriteElementString("test2",Server.HtmlEncode(txttest2.Text.Trim()));
writer.WriteEndElement();
writer.WriteEndDocument();
writer.Close();
-----Original Message-----
From: ChellaBala
[mailto:[EMAIL PROTECTED]
Sent: Monday, March 14, 2005 11:53
AM
To: BDOTNET
Subject: Reading and Writing to Config.xml
using .Net Compact Framework
New Message on BDOTNET
Reading
and Writing to Config.xml using .Net Compact
Framework
Reply
Reply to Sender Recommend
Message 1 in
Discussion
From: ChellaBala
Hi,
I am reading Config.xml using the dataset as
follows:
For litable = 0 To ds.Tables.Count - 1
For
licol = 0 To ds.Tables(litable).Columns.Count -
1
Nodename =
ds.Tables(litable).Columns(licol).ToString
Nodedata =
ds.Tables(litable).Rows(0).Item(licol_
AssignXMLData(NodeName, NodeData)
Next
Next
In this case, all the elements present in Config.xml should
be unique.
If duplicate keys are there in various sections of
config.xml, then it overrides.
Config.xml sample:
------------------------
<Employee>
Name="Chella"
City="Bangalore"
<Customer>
Name="ABC"
City="XYZ"
Can anyone give a good sample of how to read and write an
xml file which is having duplicates (using DOM, dataset or
Stream object....) using .Net Compact Framework 1.0
Regards,
Chella
View other groups in this
category.
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]