Click here to Skip to main content
16,014,860 members
Home / Discussions / C#
   

C#

 
AnswerRe: A little help Pin
Abhijit Jana19-Jun-08 18:33
professionalAbhijit Jana19-Jun-08 18:33 
GeneralRe: A little help Pin
grewin19-Jun-08 19:08
grewin19-Jun-08 19:08 
QuestionsoRry for that wrong question.. Pin
maRk_maGic19-Jun-08 15:03
maRk_maGic19-Jun-08 15:03 
AnswerRe: soRry for that wrong question.. Pin
Ravi Bhavnani19-Jun-08 15:25
professionalRavi Bhavnani19-Jun-08 15:25 
Questionupdate an xml attribute Pin
nyjcr19-Jun-08 14:59
nyjcr19-Jun-08 14:59 
AnswerRe: update an xml attribute Pin
PIEBALDconsult19-Jun-08 15:08
mvePIEBALDconsult19-Jun-08 15:08 
GeneralRe: update an xml attribute Pin
nyjcr19-Jun-08 17:18
nyjcr19-Jun-08 17:18 
GeneralRe: update an xml attribute Pin
N a v a n e e t h19-Jun-08 21:14
N a v a n e e t h19-Jun-08 21:14 
nyjcr wrote:
XmlDocument upd = new XmlDocument();
upd.Load("file.xml");
XmlAttribute AttrUpd = upd.CreateAttribute("value");
AttrUpd.Value = "35.00";
upd.Save(file.xml); //THIS IS WHERE I GET THE ERROR


It works fine at my end. But your code won't add attribute. You are not appending the attribute to any of the node. So you don't find this attribute in the file. Use XPath or upd.GetElementsByTagName() to get node, and use node.Attributes.Apped(). Call Save() then.

All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

How to use google | Ask smart questions

QuestionHow2 Check if Request object is not null? Pin
mullermx19-Jun-08 14:41
mullermx19-Jun-08 14:41 
AnswerRe: How2 Check if Request object is not null? Pin
Spacix One19-Jun-08 16:39
Spacix One19-Jun-08 16:39 
GeneralRe: How2 Check if Request object is not null? Pin
mullermx20-Jun-08 6:05
mullermx20-Jun-08 6:05 
GeneralRe: How2 Check if Request object is not null? Pin
Spacix One20-Jun-08 9:15
Spacix One20-Jun-08 9:15 
QuestionHow To: network sniffing on Vista? Pin
Super Lloyd19-Jun-08 13:54
Super Lloyd19-Jun-08 13:54 
AnswerRe: How To: network sniffing on Vista? Pin
Mark Churchill19-Jun-08 18:22
Mark Churchill19-Jun-08 18:22 
GeneralRe: How To: network sniffing on Vista? Pin
Super Lloyd19-Jun-08 18:36
Super Lloyd19-Jun-08 18:36 
AnswerRe: How To: network sniffing on Vista? Pin
leppie20-Jun-08 0:41
leppie20-Jun-08 0:41 
GeneralRe: How To: network sniffing on Vista? Pin
Super Lloyd20-Jun-08 4:39
Super Lloyd20-Jun-08 4:39 
AnswerRe: How To: network sniffing on Vista? Pin
Spacix One20-Jun-08 2:50
Spacix One20-Jun-08 2:50 
QuestionPrint Pin
netJP12L19-Jun-08 11:04
netJP12L19-Jun-08 11:04 
Questionswitch statemeent. Am I missing someting Pin
TheFoZ19-Jun-08 10:59
TheFoZ19-Jun-08 10:59 
AnswerRe: switch statemeent. Am I missing someting Pin
Judah Gabriel Himango19-Jun-08 11:09
sponsorJudah Gabriel Himango19-Jun-08 11:09 
GeneralRe: switch statemeent. Am I missing someting Pin
TheFoZ19-Jun-08 11:18
TheFoZ19-Jun-08 11:18 
GeneralRe: switch statemeent. Am I missing someting Pin
Judah Gabriel Himango19-Jun-08 11:50
sponsorJudah Gabriel Himango19-Jun-08 11:50 
GeneralRe: switch statemeent. Am I missing someting Pin
TheFoZ19-Jun-08 12:45
TheFoZ19-Jun-08 12:45 
AnswerRe: switch statemeent. Am I missing someting Pin
Guffa19-Jun-08 13:24
Guffa19-Jun-08 13:24 

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.