Click here to Skip to main content
15,890,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
any one help me olz urgent...........

path of this file is...........
C:\Documents and Settings\azhar\Desktop\appsettings.xml


XML
<?xml version="1.0" standalone="yes" ?>
- <DocumentElement>
- <Location>
  <id>NMBM Test</id>
  <DataBaseName>ICMAStest</DataBaseName>
  <WebServerName>ICMAS-TEST</WebServerName>
  <DataBaseServerName>ICMAS-TEST\SQLEXPRESS</DataBaseServerName>
  <ClientSettingsProvider.ServiceUri />
  <RptUrl>http://icmas-test/ReportServer_SQLEXPRESS</RptUrl>
  <ReportPath>/ICMASReports/</ReportPath>
  <ReportServerUserName>NALIN</ReportServerUserName>
  <ReportServerPassword>temp123</ReportServerPassword>
  <SMTPServerId>10.100.0.80</SMTPServerId>
  </Location>
- <Location>
  <id>NMBM Production</id>
  <DataBaseName>ICMAStest</DataBaseName>
  <WebServerName>ICMAS-TEST</WebServerName>
  <DataBaseServerName>ICMAS-TEST\SQLEXPRESS</DataBaseServerName>
  <ClientSettingsProvider.ServiceUri />
  <RptUrl>http://icmas-test/ReportServer_SQLEXPRESS</RptUrl>
  <ReportPath>/ICMASReports/</ReportPath>
  <ReportServerUserName>NALIN</ReportServerUserName>
  <ReportServerPassword>temp123</ReportServerPassword>
  <SMTPServerId>10.100.0.80</SMTPServerId>
  </Location>
- <Location>
  <id>ICMASDev Satish</id>
  <DataBaseName>ICMAStest</DataBaseName>
  <WebServerName>192.168.0.178</WebServerName>
  <DataBaseServerName>epmpune\ciodevdb</DataBaseServerName>
  <ClientSettingsProvider.ServiceUri />
  <RptUrl>http://icmas-test/ReportServer_SQLEXPRESS</RptUrl>
  <ReportPath>/ICMASReports/</ReportPath>
  <ReportServerUserName>NALIN</ReportServerUserName>
  <ReportServerPassword>temp123</ReportServerPassword>
  <SMTPServerId>10.100.0.80</SMTPServerId>
  </Location>
- <Location>
  <id>ICMAS Test icmastest-userpc2</id>
  <DataBaseName>ICMASQA</DataBaseName>
  <WebServerName>userpc2</WebServerName>
  <DataBaseServerName>epmpune\ciodevdb</DataBaseServerName>
  <ClientSettingsProvider.ServiceUri />
  <RptUrl>http://userpc2/ReportServer_SQLEXPRESS</RptUrl>
  <ReportPath>/userpc2/</ReportPath>
  <ReportServerUserName>NALIN</ReportServerUserName>
  <ReportServerPassword>temp123</ReportServerPassword>
  <SMTPServerId>mail.24by7cio.com</SMTPServerId>
  </Location>
- <Location>
  <id>ICMASQA</id>
  <DataBaseName>ICMASQA</DataBaseName>
  <WebServerName>192.168.0.178</WebServerName>
  <DataBaseServerName>epmpune\ciodevdb</DataBaseServerName>
  <ClientSettingsProvider.ServiceUri />
  <RptUrl>http://userpc2/ReportServer_SQLEXPRESS</RptUrl>
  <ReportPath>/userpc2/</ReportPath>
  <ReportServerUserName>NALIN</ReportServerUserName>
  <ReportServerPassword>temp123</ReportServerPassword>
  <SMTPServerId>mail.24by7cio.com</SMTPServerId>
  </Location>
  </DocumentElement>
Posted

your file should be like as below. i remove "-" from it and then i load xml from asp dot net i got the success. i done code as below.

C#
XmlDocument xDoc = new XmlDocument();
xDoc.Load(@"<your path="" here="">");
</your>


Your Xml Should be
HTML
<documentelement>
<location>
  <id>NMBM Test</id>
  <databasename>ICMAStest</databasename>
  <webservername>ICMAS-TEST</webservername>
  <databaseservername>ICMAS-TEST\SQLEXPRESS</databaseservername>
  <clientsettingsprovider.serviceuri />
  <rpturl>http://icmas-test/ReportServer_SQLEXPRESS</rpturl>
  <reportpath>/ICMASReports/</reportpath>
  <reportserverusername>NALIN</reportserverusername>
  <reportserverpassword>temp123</reportserverpassword>
  <smtpserverid>10.100.0.80</smtpserverid>
</location>
<location>
  <id>NMBM Production</id>
  <databasename>ICMAStest</databasename>
  <webservername>ICMAS-TEST</webservername>
  <databaseservername>ICMAS-TEST\SQLEXPRESS</databaseservername>
  <clientsettingsprovider.serviceuri />
  <rpturl>http://icmas-test/ReportServer_SQLEXPRESS</rpturl>
  <reportpath>/ICMASReports/</reportpath>
  <reportserverusername>NALIN</reportserverusername>
  <reportserverpassword>temp123</reportserverpassword>
  <smtpserverid>10.100.0.80</smtpserverid>
</location>
</documentelement>
 
Share this answer
 
Comments
rockpune 25-Feb-12 1:22am    
plz tell me steps one by one am learnig newly plz sir its urgent
rockpune 25-Feb-12 1:28am    
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml;

public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
XmlDocument xDoc = new XmlDocument();
xDoc.Load(@"<c:\\documents and="" settings\azhar\desktop\\appsettings.xml="" here="">");

}
}
rockpune 25-Feb-12 1:29am    
gettin error
Try this..
C#
XmlDocument xDoc = new XmlDocument();
xDoc.Load("YourFilePath");


All the best..
 
Share this answer
 
Comments
rockpune 25-Feb-12 2:30am    
ok

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900