I’m having a strange issue and I can’t really find the cause. It just suddenly stopped working and I don’t know what triggered it.
I’m using XMLReader in C# to read an xml file. I’m reading the values from the xml file like this:
if(subReader2.MoveToAttribute("X"))
float.TryParse(reader.Value, NumberStyles.Any
, CultureInfo.InvariantCulture, out pt.point.X);
The xml contains a tag like this:
<Point X="0" Y="0" Easing="Linear" EaseIn="True" EaseOut="True" />
When it reads the attributes X and Y, reader.Value returns \n for some reason. It has worked before, but something is stopping it now. The attributes, Easing, EaseIn and EaseOut are being read just fine. So I have no idea why X and Y would fail.
Any ideas?
When you have
read.Value, shouldn’t that besubReader2.Value?