Jump to content

Reading location/dialogues from XML file


Darprix

Recommended Posts

Hello everyone,

I'd like to know how to read an XML file.

 

For example:

<Scenario Number=0>
  <Line Number=1 Speaker="Player">
    Hey, this is a dialogue line.
  </Line>
</Scenario>

I want to get these info in my code.

Link to comment
Share on other sites

https://github.com/LtFlash/LtFlash.Common/blob/master/LtFlash.Common/Serialization/Serializer.cs

 

First you would create a class to store data, then you use it to save/load values to/from a file using eg. 'public static void SaveToXML<T>(List<T> list, string filePath)' where T is your class.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...