Hi all
I’ve created a small list of “HistoryRegions” objects and populated the list then serialised it out to a file. I then created an XML file in the content pipeline via the CP application but now having problems building the data. Anyone have any idea. The current error I’m getting is:
An error occured parsing --> system.xml.xmlexception: “element” is an invalid XmlNodeType. Line 4, position 56. (note the app doesn’t allow me to copy and paste exact text).
Here is the XML:
<?xml version="1.0" encoding="utf-8"?> 135322552552552554294967295 232622552552552554294967295 367452552552552554294967295 497292552552552554294967295and here is the class:
[Serializable]
public class HistoryRegion
{
public string Key;
public int X;
public int Y;
//public byte B;
//public byte G;
//public byte R;
//public byte A;
//[XmlIgnore]
public Color Color;
public HistoryRegion() { }
public HistoryRegion(string key, int x, int y, Color regionColor)
{
Key = key;
X = x;
Y = y;
//Color = regionColor;
//B = regionColor.B;
//G = regionColor.G;
//R = regionColor.R;
//A = regionColor.A;
}
}
I’ve tried changing it around and just saving out the RGB values but then when I use ‘[XmlIgnore]’ on the Color field, the error I get is that it expects to see the Color field in the xml - it appears to be ignoring the xmlignore attribute.
I’ve edited the xml and made it so Color is just ‘Color 4294967295 /Color’ (brackets removed) with the number shown and the number 0, but get an error about uint being to big or small.
Any ideas? All I want to load in is a list of “Key, X, Y, Color” from a xml file in the content pipeline (built to xnb)
Thanks