using System; using System.Collections.Generic; using System.Text; namespace xmlTools { /// /// This class represents a xmlTextValue. It supports various dimensions separated by spaces. For example a vehicle array: "car motorcycle bicycle" /// It also includes various functions to work with multi dimensional xml string values /// class XmlTextValue { public List myValues = new List(); //include all dimensions of the value public XmlTextValue(String myString) { String[] values = myString.Split(' '); foreach (string value in values) { this.myValues.Add(value); } } public XmlTextValue(List myDimensions) { this.myValues = myDimensions; } public override string ToString() { String result = ""; for (int i = 0; i < this.myValues.Count - 1; i++) { result += this.myValues[i] + " "; } result += this.myValues[this.myValues.Count - 1]; return result; } } }