internal XElement CreateXML(string childName)
{
var xRoot = new XElement(childName);
if (LeftChild != null)
xRoot.Add(LeftChild.CreateXML(XmlConstants.LeftChild));
if (RightChild != null)
xRoot.Add(RightChild.CreateXML(XmlConstants.RightChild));
if (VariableType != null)
xRoot.Add(new XElement(XmlConstants.Type, VariableType));
if (VariableValue != null)
xRoot.Add(new XElement(XmlConstants.Value, VariableValue));
return xRoot;
}
}