I have an xml file that looks like this:
<dialog> <name>5</name> <onEvent type="quest" status="completed">2</onEvent> <disposable>true</disposable> <replic> <character>frost</character> <message>Вот так, просыпайтесь, мисс Хоуп.</message> </replic> <replic> <character>betty_hope</character> <message>Я ничего не понимаю. Доктор Мороу жив? Он с кем-то говорил...</message> </replic> <replic> <character>frost</character> <message>Вам почудилось, мисс. Доктор мертв. А у вас был шок.</message> </replic> </dialog> I'm trying to make an editor in C # that would allow me to add and edit dialogs in this file. Now my dialogs are stored in an array of Phrase objects. The class itself consists of 2 elements of the string type:
- one for character name
- another for replica.
Using Linq to XML add all elements from an array to an XML file.