public AppletDescNode(URL codebaseURL, Element node) throws InvalidJNLPException {
      if(!node.getNodeName().equals(NAME)) {
         String msg = Resources.jnlpBundle.getString("jnlp.xml.bad.element");
         throw new InvalidJNLPException(MessageFormat.format(msg, NAME));
      }
      
      mainClass = node.getAttribute("main-class");
      documentbase = node.getAttribute("documentbase");
      name = node.getAttribute("name");
      
      try {
         String w = node.getAttribute("width");
         if(w != null || !w.equals(""))
            width = Integer.parseInt(w);
      }
      catch(NumberFormatException badNum) {
         width = -1;
      }
      
      try {
         String h = node.getAttribute("height");
         if(h != null || !h.equals(""))
            height = Integer.parseInt(h);
      }
      catch(NumberFormatException badNum) {
         height = -1;
      }
      
      try {
         docBaseURL = new URL(codebaseURL, documentbase);
      }
      catch(MalformedURLException badURL) {
         String msg = Resources.jnlpBundle.getString("jnlp.applet.docbase.invalid");
         throw new InvalidJNLPException(MessageFormat.format(msg, documentbase));
      }
      
      processChildren(codebaseURL, node);
   }