Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Reading an .xml file in c#

Featured Replies

OK - this is another stupid question, which I hope somebody can help me with. 

 

I am trying to store data in an xml file, to use again after the game is reloaded. 

 

I have managed to use xmlWriter to write an xml file to store data 

 

Example xml created: 

<?xml version="1.0" encoding="utf-8"?>
<Parent>
       <Child1>String here</Child1>
       <Child2>Value here</Child2>
</Parent>

I am now trying to read that data back into the plugin.  I cannot for the life of me get it to work, and hours of googling and trying code all I have managed to do is find new and interesting ways to crash the game. 

 

I have tried examples of xmlReader as well as 

 

Can anybody help me get the value in Child1 into a string variable for me to use in the plugin? 

  • Author

The declared path was "Plugins/LSPDFR/MyFile.xml"

 

While XML was being created correctly, it could not be read. Spotting the rookie mistake, and reversing my slashes fixed the read error. 

 

Now the path reads: "Plugins\\LSPDFR\\MyFile.xml" and the read works as well as write. 

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...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.