C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




reading an xml file,windows application


Posted Date: 29 Jul 2008      Total Responses: 1

Posted By: anandraopatwari       Member Level: Silver     Points: 1



hi friends

i have an xml file on my desktop
i have to read that xml file and i have to create the columns in the database
based on the xmlfile
in xml file it consists of table name as node inside columns with datatypes will be prsent and column values also present
i have to create columns
how to creat it

thanks in advance





Responses

Author: ANIL PANDEY    29 Jul 2008Member Level: DiamondRating:     Points: 6


Hi,
First of all open the Xml File and read it content, if u get any elemnet than store its value in any Varriable after that u can use that name to create the table....


For example..

XmlTextReader xRead = new XmlTextReader((Application.StartupPath + "\\" + strNewFile));
try
{
//Reading the XML file
while (xRead.Read())
{
XmlNodeType nodeType = xRead.NodeType;

if (nodeType == XmlNodeType.Element)
{
if ((xRead.Name ==Name"))
{
string name = xRead.name
}
}
}
}
}


Thanks
Anil Pandey


Thanks & Regards
Anil Kumar Pandey



Post Reply
You must Sign In to post a response.
Next : About XLST
Previous : How to store XML File In String Builder
Return to Discussion Forum
Post New Message
Category: XML

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use