Пример #1
0
 public XMLatt clone()
 {
     XMLatt temp = new XMLatt();
     temp.aname = aname;
     temp.acontent = acontent;
     return temp;
 }
 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);
     }
 }
 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);
     }
 }