code: static int readInt(Node node)
      {
          if (node == null)
          {
              throw new XmlException(
                  "Tried to read int value from null node");
          }
          String value = node.getFirstChild().getNodeValue();
          if (value == null)
          {
              throw new XmlException(
                  "Tried to read int value from null value");
          }
          try
          {
              return Integer.parseInt(value);
          }
          catch (NumberFormatException e)
          {
              throw new XmlException(
                  "Expected int value, found \""+value+"\"", e);
          }
      }
docs: Parse an int value from the first child of the given node.
  
  @param node The node
  @return The int value
  @throws XmlException If the given node was <code>null</code>, or no
  int value could be parsed