Click here to Skip to main content
15,916,371 members
Home / Discussions / C#
   

C#

 
GeneralRe: Compare picturebox.image with image from a resource file Pin
dizzyJ19-Apr-10 2:03
dizzyJ19-Apr-10 2:03 
GeneralRe: Compare picturebox.image with image from a resource file Pin
Anindya Chatterjee19-Apr-10 2:50
Anindya Chatterjee19-Apr-10 2:50 
GeneralRe: Compare picturebox.image with image from a resource file Pin
dizzyJ19-Apr-10 3:07
dizzyJ19-Apr-10 3:07 
AnswerRe: Compare picturebox.image with image from a resource file Pin
sadiq_arbaoui17-Jan-11 23:07
sadiq_arbaoui17-Jan-11 23:07 
QuestionManipulate XML Pin
NarVish18-Apr-10 23:32
NarVish18-Apr-10 23:32 
AnswerRe: Manipulate XML Pin
NavnathKale19-Apr-10 0:00
NavnathKale19-Apr-10 0:00 
GeneralRe: Manipulate XML Pin
NarVish19-Apr-10 1:13
NarVish19-Apr-10 1:13 
GeneralRe: Manipulate XML Pin
NavnathKale19-Apr-10 2:08
NavnathKale19-Apr-10 2:08 
XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.Load(Application.StartupPath + "\\doc.xml");

            string xpath = string.Format("/StudentRecords/Student");
            XmlNodeList fieldNodes = xmlDoc.SelectNodes(xpath);

            XmlNode studentNode = null;
            XmlNode refNode = null;
            
            foreach (XmlNode node in fieldNodes)
            {
                if (node.Attributes["ID"].Value == "101")
                {
                    studentNode = node;
                    refNode = node.SelectSingleNode("StudentSubject");
                }
            }

            if (studentNode != null && refNode != null)
            {
                XmlElement newcatalogentry = xmlDoc.CreateElement("StudentMarks");
                XmlAttribute newcatalogattr = xmlDoc.CreateAttribute("Total");

                newcatalogattr.Value = "100";

                // Attach the attribute to the XML element
                newcatalogentry.SetAttributeNode(newcatalogattr);

                // New XML element inserted into the document
                studentNode.InsertAfter(newcatalogentry, refNode);

                string path = "C:\\test.xml";
                
                xmlDoc.Save(path);
            }


updated within post area, test it at your end Cool | :cool:
GeneralRe: Manipulate XML Pin
NarVish19-Apr-10 3:11
NarVish19-Apr-10 3:11 
GeneralRe: Manipulate XML Pin
NarVish19-Apr-10 19:13
NarVish19-Apr-10 19:13 
GeneralRe: Manipulate XML Pin
NavnathKale19-Apr-10 21:48
NavnathKale19-Apr-10 21:48 
GeneralRe: Manipulate XML Pin
NarVish19-Apr-10 23:34
NarVish19-Apr-10 23:34 
GeneralRe: Manipulate XML Pin
NavnathKale20-Apr-10 0:58
NavnathKale20-Apr-10 0:58 
GeneralRe: Manipulate XML Pin
NarVish20-Apr-10 1:20
NarVish20-Apr-10 1:20 
GeneralRe: Manipulate XML Pin
NavnathKale20-Apr-10 1:21
NavnathKale20-Apr-10 1:21 
QuestionHow to put large text data (~20mb) into sql cs 3.5 database? Pin
Anindya Chatterjee18-Apr-10 21:42
Anindya Chatterjee18-Apr-10 21:42 
AnswerRe: How to put large text data (~20mb) into sql cs 3.5 database? Pin
Ashfield18-Apr-10 22:16
Ashfield18-Apr-10 22:16 
GeneralRe: How to put large text data (~20mb) into sql cs 3.5 database? Pin
Anindya Chatterjee18-Apr-10 22:28
Anindya Chatterjee18-Apr-10 22:28 
GeneralRe: How to put large text data (~20mb) into sql cs 3.5 database? Pin
Ashfield18-Apr-10 22:43
Ashfield18-Apr-10 22:43 
GeneralRe: How to put large text data (~20mb) into sql cs 3.5 database? Pin
Md. Marufuzzaman19-Apr-10 0:09
professionalMd. Marufuzzaman19-Apr-10 0:09 
GeneralRe: How to put large text data (~20mb) into sql cs 3.5 database? Pin
Anindya Chatterjee19-Apr-10 0:41
Anindya Chatterjee19-Apr-10 0:41 
QuestionMFC to C# HELP ? Pin
Nematjon Rahmanov18-Apr-10 20:16
Nematjon Rahmanov18-Apr-10 20:16 
AnswerRe: MFC to C# HELP ? Pin
Jimmanuel19-Apr-10 4:08
Jimmanuel19-Apr-10 4:08 
QuestionNetwork Scanning Pin
satsumatable18-Apr-10 19:39
satsumatable18-Apr-10 19:39 
Questiondeploying web service on windows 7 Pin
Ice_Freez0518-Apr-10 18:56
Ice_Freez0518-Apr-10 18:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.