Draxofavalon
New Member
I am new to C# programming and XML. I wanted to change the string (which starts with @ and end with ') with the date (which I will pick from date picker) Please have a look on below XML file \[code\]<steps> <step1>drop table emp1 purge</step1> <step2>create table emp1 as select e1.first_name ,e1.last_name ,e1.phone_number ,e1.salary ,e1.hire_date from employees e1 where e1.hire_date between '@m_start_date' to '@m_end_date' group by e1.first_name ,e1.last_name ,e1.phone_number ,e1.salary ,e1.hire_date</step2> <step3>select * from emp1</step3> </steps> \[/code\]In the above Xml code I wanted to change @m_start_date with '01-sep-2012' and @m_end_date with '30-sep-2012' The most important point is the strings @m_start_date and @m_end_date are not fixed it my change in other xml file (i.e. it may be @wk_start_dte and wk_end_dte) so I need a logic in C# where we can find a string starts with @ and end with ' so we can replace this string with date.The expected result should be like this\[code\]<steps> <step1>drop table emp1 purge</step1> <step2>create table emp1 as select e1.first_name ,e1.last_name ,e1.phone_number ,e1.salary ,e1.hire_date from employees e1 where e1.hire_date between '01-sep-2012' to '30-sep-2012' group by e1.first_name ,e1.last_name ,e1.phone_number ,e1.salary ,e1.hire_date</step2> <step3>select * from emp1</step3> </steps>\[/code\]Can you please help me to get this logic in C#?