private void LoadRestrictionFromXML(System.Xml.XmlNode node, int index)
 {
     if (System.String.Compare(node.Name, "rules", true) == 0)
     {
         XMLline templine = new XMLline();
         if (node.Attributes.GetNamedItem("type") != null)
             templine.type = node.Attributes.GetNamedItem("type").Value;
         for (int j = 0; j < node.Attributes.Count; j++)
         {
             XMLatt temp_class = new XMLatt();
             temp_class.aname = node.Attributes[j].Name;
             temp_class.acontent = node.Attributes[j].Value;
             templine.attributelist.Add(temp_class); //add to the line
         }
         res_list.varlist.Add(templine);
     }
 }
 private void LoadVarFromXML(System.Xml.XmlNode node, int index)
 {
     if (System.String.Compare(node.Name, "variable", true) == 0)
     {
         XMLline templine = new XMLline();
         if (node.Attributes.GetNamedItem("id") != null)
             templine.type = node.Attributes.GetNamedItem("id").Value;
         for (int j = 0; j < node.Attributes.Count; j++)
         {
             XMLatt temp_class = new XMLatt();
             temp_class.aname  = node.Attributes[j].Name;
             temp_class.acontent  = node.Attributes[j].Value;
             templine.attributelist.Add(temp_class);
         }
         var_list.varlist.Add(templine);
     }
 }
 public XMLline clone()
 {
     XMLline templine = new XMLline();
     if (type != null)
         templine.type = type;
     if (attributelist != null)
     {
         for (int i=0; i < attributelist.Count; i ++)
         {
            templine.attributelist.Add(((XMLatt)attributelist[i]).clone());
         }
     }
     return templine;
 }