Link to home
Start Free TrialLog in
Avatar of RameshLathu
RameshLathuFlag for United States of America

asked on

read xml in C#

How read one xml file and form another xml file using C#?

I have a xml file like,

<policydetails>
  <current>
     <no></no>
     <type></type>
</current>
<prior>
  <no></no>
  <type></type>
</prior>
</policydetails>

I need to read the above xml file (read nodes like policydetails, current) and using the node read another excel file get the value for spefic node,

say for eg, from xml read the node policydetails and get the value for policydetails from excel file.

Then I want to use both the tag name and value from excel and create another xml as below,

<policydetails>
  <current>
     <no>1</no>
     <type>A</type>
</current>
<prior>
  <no>2</no>
  <type>B</type>
</prior>
</policydetails>

I want to do this in C#, please help
SOLUTION
Avatar of Member_2_4913559
Member_2_4913559
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you can use xslt to do this job
ASKER CERTIFIED SOLUTION
Avatar of Dmitry G
Dmitry G
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RameshLathu

ASKER

Thanks