Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
Questionhow to put a string in an array Pin
faladrim20-Sep-06 3:58
faladrim20-Sep-06 3:58 
AnswerRe: how to put a string in an array Pin
Coding C#20-Sep-06 4:09
Coding C#20-Sep-06 4:09 
GeneralRe: how to put a string in an array Pin
faladrim20-Sep-06 4:25
faladrim20-Sep-06 4:25 
GeneralRe: how to put a string in an array Pin
faladrim20-Sep-06 4:34
faladrim20-Sep-06 4:34 
GeneralRe: how to put a string in an array Pin
Coding C#20-Sep-06 4:40
Coding C#20-Sep-06 4:40 
QuestionHow to upload file to HTTPS site Pin
tb6020-Sep-06 3:47
tb6020-Sep-06 3:47 
QuestionRemote Debugging [modified] ..am i in the right forum ??? Pin
iqazi20-Sep-06 3:23
iqazi20-Sep-06 3:23 
QuestionHow to modify the data in xml file? Pin
CooperWu20-Sep-06 3:22
CooperWu20-Sep-06 3:22 
hi all,
I have a xml file like this
<code>

<?xml version="1.0" encoding="utf-8" ?>
<app-settings>
<sqlconnection string="sql" />
<generate-interval value="" />
<monitors>
<file filename="test.file" />
</monitors>
<templates>
<template xsl="hello1.xsl" outputhtml="hello1.html" xmldata="hello1.xml"
sqlquery="select top 10 * from table1"
linkurl="http://www.test.com/query.aspx?linkid=%aa%"/>
<template xsl="hello2.xsl" outputhtml="hello2.html" xmldata="hello2.xml"
sqlquery="select top 10 * from table1"
linkurl="http://www.test.com/query.aspx?linkid=%aa%"/>
</templates>
</app-settings>

</code>
then I want get and modify the app-settings/monitors/file attribute like 'filename'.
how to do it?
I tried this code, but it doesn't work.
<code>
XmlDocument doc = new XmlDocument();
XmlNode node = doc.SelectSingleNode("/app-settings/templates/template");

if (node != null)
{
Console.WriteLine("ok");
}
else
{
Console.WriteLine("error");
}
</code>

Thanks for your help.Rose | [Rose]

AnswerRe: How to modify the data in xml file? Pin
CooperWu20-Sep-06 3:34
CooperWu20-Sep-06 3:34 
AnswerRe: How to modify the data in xml file? Pin
Stefan Troschuetz20-Sep-06 3:38
Stefan Troschuetz20-Sep-06 3:38 
GeneralRe: How to modify the data in xml file? Pin
CooperWu20-Sep-06 3:54
CooperWu20-Sep-06 3:54 
QuestionHow to get access to NET2.0 methods in VS2005 Pin
Atlemann20-Sep-06 3:14
Atlemann20-Sep-06 3:14 
AnswerRe: How to get access to NET2.0 methods in VS2005 Pin
Dave Kreskowiak20-Sep-06 6:18
mveDave Kreskowiak20-Sep-06 6:18 
QuestionData Relation / Databinding Correct With XML visible -sorry Pin
harwanegg20-Sep-06 3:10
harwanegg20-Sep-06 3:10 
QuestionData Relation / Databinding Pin
harwanegg20-Sep-06 3:08
harwanegg20-Sep-06 3:08 
Questionhorizontal scrollbar for ListView component in my WinForm Pin
a#@20-Sep-06 2:47
a#@20-Sep-06 2:47 
QuestionFunction method Pin
Kasic Slobodan20-Sep-06 2:45
Kasic Slobodan20-Sep-06 2:45 
AnswerRe: Function method Pin
User 665820-Sep-06 2:55
User 665820-Sep-06 2:55 
QuestionRe: Function method Pin
Kasic Slobodan20-Sep-06 5:34
Kasic Slobodan20-Sep-06 5:34 
AnswerRe: Function method Pin
S. Senthil Kumar20-Sep-06 5:54
S. Senthil Kumar20-Sep-06 5:54 
GeneralRe: Function method Pin
Kasic Slobodan20-Sep-06 6:32
Kasic Slobodan20-Sep-06 6:32 
GeneralRe: Function method Pin
Kasic Slobodan20-Sep-06 6:42
Kasic Slobodan20-Sep-06 6:42 
QuestionExposing C# to COM / Inheritance of objects/interfaces Pin
Adam Clauss20-Sep-06 2:21
Adam Clauss20-Sep-06 2:21 
QuestionTrim textbox Pin
Yustme20-Sep-06 2:14
Yustme20-Sep-06 2:14 
QuestionRe: Trim textbox Pin
Sebastian Schneider20-Sep-06 2:29
Sebastian Schneider20-Sep-06 2:29 

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.