hey guys..i want to read some datas from a website that are in xml document..i wrote that codes below
|
i can read Xml file including with that codes that i created but not from website..should i do something else to read from website..here is the structure of the web site xml file http://img228.imageshack.us/f/22741667.jpg/
CrishPosted Dec 2, 2010, 2:09 AM
Its good question.I think i have its solution if you want to more detail about it just check this below link.
http://weblogs.asp.net/scottgu/archive/2007/01/11/tip-trick-how-to-upload-a-sql-file-to-a-hoster-and-execute-it-to-deploy-a-sql-database.aspx
Erdinc KolukisaPosted Dec 1, 2010, 2:48 AM
hey guys..tahnks for your answers.this code block worked well for me
XmlTextReader xtr = new XmlTextReader("Dosya3.Xml");
while (xtr.Read())
{
XmlNodeType nodeType = xtr.NodeType;
switch (nodeType)
{
case XmlNodeType.Element:
Console.WriteLine("Element name is : {0}", xtr.Name);
if (xtr.HasAttributes)
{
for (int i = 0; i < xtr.AttributeCount; i++)
{
xtr.MoveToAttribute(i);
Console.WriteLine("Attribute is :{0} with value : {1}", xtr.Name, xtr.Value);
}
}
break;
case XmlNodeType.Text :
Console.WriteLine("Value is : {0}", xtr.Value);
break;
default:
break;
}
}
Sam HobbsPosted Nov 30, 2010, 8:14 PM
Suthish NairPosted Nov 30, 2010, 10:27 AM
Erdinc KolukisaPosted Nov 30, 2010, 10:14 AM
ShankeyPosted Nov 30, 2010, 9:19 AM
From web site are you able to get your file. If this is not the case then you can use
Server.MapPath Method to locate the file.