Beispiel #1
0
 internal int getIntAttribute(XMLElement elem, String name)
 {
     System.String val = elem.getAttribute(name);
     if (val == null)
     {
         throwException("Attribute " + name + " is not set");
     }
     try
     {
         return System.Int32.Parse(val);
     }
     catch (System.FormatException)
     {
         throwException("Attribute " + name + " should has integer value");
     }
     return -1;
 }
Beispiel #2
0
 internal System.String getAttribute(XMLElement elem, String name)
 {
     System.String val = elem.getAttribute(name);
     if (val == null)
     {
         throwException("Attribute " + name + " is not set");
     }
     return val;
 }