C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » XML »

Execute xml file to copy or delete files from a directory


Posted Date: 22 Sep 2009      Posted By: VMRK      Member Level: Silver     Points: 1   Responses: 2



Hi I have a master xml file in which the shard location and install location has to be mentioned and the C# code should get the path from this file to do all the operations.
please anyone help me with code on reading the XPath from XMl





Responses

Author: Lakhan Pal    22 Sep 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Hi-

Check this link for code related to Read XML Data:

http://lakhangarg.blogspot.com/2009/08/code-to-create-own-currency-convertor.html

Please rate this answer if it helped you.
Thanks & Regards
Lakhan Pal Garg
Free Code Snippets



Author: Anil Kumar Pandey    22 Sep 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

try this for reading XML



//Reading the XML file
while (xRead.Read())
{
XmlNodeType nodeType = xRead.NodeType;

if (nodeType == XmlNodeType.Element)
{
if ((xRead.Name == "graphic") || (xRead.Name == "inline-graphic"))
{
lintImageCount += 1;
if (xRead.HasAttributes)
{
xRead.MoveToAttribute(0);
strImagename = xRead.Value;
blnOk = FileCheck(strImagename);
if (blnOk == false)
{
break;
}
}
}
}
}

}


Thanks & Regards
Anil Kumar Pandey



Post Reply
You must Sign In to post a response.
Next : Inserting data
Previous : Min and max
Return to Discussion Forum
Post New Message
Category: XML

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use