BUGFIX: mixed upper/lowercase attribute names

This commit is contained in:
Simon Martens
2024-11-20 19:49:09 +01:00
parent a6ecafd153
commit a028bf7c6b

View File

@@ -2,20 +2,17 @@
using System.Collections.Generic;
using System.Text;
using HaXMLReader.Interfaces;
namespace HaXMLReader.EvArgs
{
public class Tag : EventArgs, IReaderEvArg
{
namespace HaXMLReader.EvArgs {
public class Tag : EventArgs, IReaderEvArg {
public string Name { get; set; } = "";
public Dictionary<string, string> Values { get; set; } = new Dictionary<string, string>();
public bool IsEmpty { get; set; } = false;
public bool EndTag { get; set; } = false;
// Privides safe access to the values Dict
public string this[string key]
{
get
{
public string this[string key] {
get {
key = key.ToLower();
if (Values != null && Values.ContainsKey(key))
return Values[key];
else