ReaderAttribute - AonaSuzutsuki/SavannahXmlLib GitHub Wiki

Attributes

Sample XML

<?xml version="1.0" encoding="UTF-8"?>
<ServerSettings>
  <property name="ServerName" value="My Game Host">
    Whatever you want the name of the server to be.
  </property>
  <property name="ServerDescription" value="A 7 Days to Die server">
    Whatever you want the server description to be, will be shown in the server browser.
  </property>
  <property name="ServerWebsiteURL" value="">
    Website URL for the server, will be shown in the serverbrowser as a clickable link.
  </property>
</ServerSettings>

Get attributes

Get some attributes as IEnumerable<string>.

var names = reader.GetAttributes("name", "/ServerSettings/property");

foreach (var name in names)
    Console.WriteLine(name);
ServerName
ServerDescription
ServerWebsiteURL

Get the attribute

var name = reader.GetAttribute("name", "/ServerSettings/property");
Console.WriteLine(name);
ServerName
⚠️ **GitHub.com Fallback** ⚠️