private void decProtocol (Node node, TypeProtocol type) throws Exception
    {
        NodeList nodes = node.getChildNodes();
        Node nClient = null;
        Node nServer = null;
        String pName = type.getName();
        for (int i = 0; i < nodes.getLength(); i++)
        {
            Node n = nodes.item(i);
            if (Node.ELEMENT_NODE != n.getNodeType())
                continue;
            if (n.getNodeName().toLowerCase().equals(XML_NODE_CLIENT))
            {
                if (nClient == null)
                    nClient = n;
                else
                    onError(node, "Repeated client in protocol '" + pName + "'");
            }
            else if (n.getNodeName().toLowerCase().equals(XML_NODE_SERVER))
            {
                if (nServer == null)
                    nServer = n;
                else
                    onError(node, "Repeated server in protocol '" + pName + "'");
            }
            else
            {
                onError(node, "Invalid element in protocol '" + pName + "'");
            }
        }
        if (nClient != null)
        {
            decStruct(nClient, type.getClient());
            type.setNoClient(false);
        }
        if (nClient != null)
        {
            decStruct(nServer, type.getServer());
            type.setNoServer(false);
        }
    }