Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello.

I am making a serializable XML stream. I get the data from the classes and user input.
Then I go to saving method and here is my question.

Example XML:
XML
<?xml version="1.0" encoding="UTF-8"?>
<dates>
  <date value="19-10-2014">
    <progLang value="Java">
      <Name>Java</Name>
      <Price>Free</Price>
    </progLang>
    <progLang value="Ruby">
      <Name>Ruby</Name>
      <Price>$400</Price>
    </progLang>
  </date>
  <date value="20-10-2014">
    <progLang value="C#">
      <Name>C#</Name>
      <Price>€40000</Price>
    </progLang>
  </date>
</dates>


How to add new date entry to this existing xml file?
Posted

1 solution

You can use XML Linq.
MSDN has some pretty good examples for how to use XDocument and XElement.
XDocument Class[^]
XElement Class[^]
 
Share this answer
 

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