TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Programing Languages > C#(C Sharp)

Notices

Reply
 
Thread Tools Display Modes
Old 02-05-2008, 10:03 PM   #1
Newbie
 
Join Date: May 2008
Age: 22
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 rsiddhartht is an unknown quantity at this point
writing parser in c#

hi

i need to write a program(parser) in c# which parses the file and replaces a keyword with another one which is stored in an xml file.. the structure of the xml file is as follows:

<mappings>
<map id="1">
<search>aaa</search>
<replace>bbb</replace>
</map>
<map id="2">
<search>ccc</search>
<replace>ddd</replace>
</map>
.
.
.
.
.
.
.
<mappings>

now the parser must search for the keywords specified in the "search"(present in xml i.e aaa,ccc)in the file.. and replace its occurrance with the "replace"(present in the x,l i.e bbb,ddd).so that the end result must look like this..

(BEFORE PARSING)
today was a aaa day..

(AFTER PARSING)
today was a bbb day..


Someone pl give me the source code to do the same....

thanks
Sid

rsiddhartht is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Google
 


All times are GMT +5.5. The time now is 06:23 AM.


vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2008, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional