Click here to Skip to main content
15,885,954 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
i have xml file and i want to change element attribute name and value
please need that quickly
Posted
Updated 25-Nov-11 21:57pm
v2
Comments
DaveAuld 26-Nov-11 3:58am    
Urgent and Quickly and requests for hurried response don't work and are rude. If you need prompt service then consider a paid service. People on here will get round to your query in their own time......
Sergey Alexandrovich Kryukov 26-Nov-11 23:38pm    
Not a question. If you want it -- do it. What's the problem?
--SA

1 solution

Hi,

Use a streamreader to read your xml file then use the String.Replace method to replace the previous attribute with the new one.

For your reference:
http://stackoverflow.com/questions/2868489/c-sharp-stream-reader-adding-n-to-xml[^]

Best regards,
Eduard
 
Share this answer
 
v2
Comments
Aja wakim 26-Nov-11 4:40am    
this is the correct answer.
[no name] 26-Nov-11 4:41am    
thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900